Skip to content
Snippets Groups Projects
Commit 4152de60 authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Fixed missing fatet normals calculation (moved from the SymmetryEstimator)

parent 9d9fcd93
No related branches found
No related tags found
No related merge requests found
...@@ -83,11 +83,6 @@ public class SymmetryEstimator { ...@@ -83,11 +83,6 @@ public class SymmetryEstimator {
* Calculates the symmetry plane. * Calculates the symmetry plane.
*/ */
public void calculateSymmetryPlane() { public void calculateSymmetryPlane() {
if (!facet.hasVertexNormals()) {
facet.calculateVertexNormals();
}
curvatures = calculateCurvatures(facet, maxCurvatureAlg); curvatures = calculateCurvatures(facet, maxCurvatureAlg);
final SignificantPoints sigPoints = new SignificantPoints(curvatures, config.getSignificantPointCount()); final SignificantPoints sigPoints = new SignificantPoints(curvatures, config.getSignificantPointCount());
sigPoints.cacheData(facet); sigPoints.cacheData(facet);
......
...@@ -8,9 +8,6 @@ import java.util.Collections; ...@@ -8,9 +8,6 @@ import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/** /**
* Abstract class for algorithms calculting curvatures of mesh vertices. * Abstract class for algorithms calculting curvatures of mesh vertices.
...@@ -49,12 +46,12 @@ public abstract class CurvatureVisitor extends MeshVisitor { ...@@ -49,12 +46,12 @@ public abstract class CurvatureVisitor extends MeshVisitor {
return; // already visited facet return; // already visited facet
} }
curvatures.put(facet, new ArrayList<>()); curvatures.put(facet, new ArrayList<>());
if (!facet.hasVertexNormals()) {
facet.calculateVertexNormals();
}
facet.calculateVoronoiPoints(); facet.calculateVoronoiPoints();
} }
ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
final List<Future<Double>> results = new ArrayList<>(facet.getNumberOfVertices());
final List<MeshTriangle> triangles = facet.getTriangles(); final List<MeshTriangle> triangles = facet.getTriangles();
for (int i = 0; i < facet.getNumberOfVertices(); i++) { for (int i = 0; i < facet.getNumberOfVertices(); i++) {
curvatures.get(facet).add(calculateCurvature(facet, triangles, i)); curvatures.get(facet).add(calculateCurvature(facet, triangles, i));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment