Commit 0a760af4 authored by Numanoglu's avatar Numanoglu
Browse files

BVH Tree up to date

parent 73b1c745
Pipeline #12382 failed with stage
in 2 minutes
...@@ -63,6 +63,7 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration; ...@@ -63,6 +63,7 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
/** /**
* Variants: * Variants:
* - OLD: only BoundingBox replaced by AABB, logic otherwise unchanged * - OLD: only BoundingBox replaced by AABB, logic otherwise unchanged
* (the most efficient for little models)
* - TREE_1_EDGE_BVH: edge-edge broad phase via BVH * - TREE_1_EDGE_BVH: edge-edge broad phase via BVH
* - TREE_2_EDGE_AND_VERTEX_BVH: edge-edge via edge BVH, point-edge via vertex BVH * - TREE_2_EDGE_AND_VERTEX_BVH: edge-edge via edge BVH, point-edge via vertex BVH
* *
...@@ -124,16 +125,16 @@ public class RingSelfIntCheck extends Check { ...@@ -124,16 +125,16 @@ public class RingSelfIntCheck extends Check {
public void check(LinearRing lr) { public void check(LinearRing lr) {
switch (variant) { switch (variant) {
case OLD: case OLD:
checkRingJavaOld(lr); checkRingOld(lr);
break; break;
case TREE_1_EDGE_BVH: case TREE_1_EDGE_BVH:
checkRingJavaTree1(lr); checkRingTree1(lr);
break; break;
case TREE_2_EDGE_AND_VERTEX_BVH: case TREE_2_EDGE_AND_VERTEX_BVH:
checkRingJavaTree2(lr); checkRingTree2(lr);
break; break;
default: default:
checkRingJavaOld(lr); checkRingOld(lr);
break; break;
} }
} }
...@@ -142,7 +143,7 @@ public class RingSelfIntCheck extends Check { ...@@ -142,7 +143,7 @@ public class RingSelfIntCheck extends Check {
* OLD: * OLD:
* only BoundingBox -> AABB replaced, otherwise logic unchanged. * only BoundingBox -> AABB replaced, otherwise logic unchanged.
*/ */
private void checkRingJavaOld(LinearRing lr) { private void checkRingOld(LinearRing lr) {
List<Vertex> vertices = lr.getVertices(); List<Vertex> vertices = lr.getVertices();
Vector3d centroid = CovarianceMatrix.getCentroid(vertices); Vector3d centroid = CovarianceMatrix.getCentroid(vertices);
EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid); EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid);
...@@ -187,7 +188,7 @@ public class RingSelfIntCheck extends Check { ...@@ -187,7 +188,7 @@ public class RingSelfIntCheck extends Check {
* - point-edge remains old * - point-edge remains old
* - edge-edge uses Edge-BVH * - edge-edge uses Edge-BVH
*/ */
private void checkRingJavaTree1(LinearRing lr) { private void checkRingTree1(LinearRing lr) {
List<Vertex> vertices = lr.getVertices(); List<Vertex> vertices = lr.getVertices();
Vector3d centroid = CovarianceMatrix.getCentroid(vertices); Vector3d centroid = CovarianceMatrix.getCentroid(vertices);
EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid); EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid);
...@@ -253,7 +254,7 @@ public class RingSelfIntCheck extends Check { ...@@ -253,7 +254,7 @@ public class RingSelfIntCheck extends Check {
* - point-edge uses Vertex-BVH * - point-edge uses Vertex-BVH
* - edge-edge uses Edge-BVH * - edge-edge uses Edge-BVH
*/ */
private void checkRingJavaTree2(LinearRing lr) { private void checkRingTree2(LinearRing lr) {
List<Vertex> vertices = lr.getVertices(); List<Vertex> vertices = lr.getVertices();
Vector3d centroid = CovarianceMatrix.getCentroid(vertices); Vector3d centroid = CovarianceMatrix.getCentroid(vertices);
EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid); EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment