Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
0a760af4
Commit
0a760af4
authored
Apr 10, 2026
by
Numanoglu
Browse files
BVH Tree up to date
parent
73b1c745
Pipeline
#12382
failed with stage
in 2 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/RingSelfIntCheck.java
View file @
0a760af4
...
@@ -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:
checkRing
Java
Old
(
lr
);
checkRingOld
(
lr
);
break
;
break
;
case
TREE_1_EDGE_BVH:
case
TREE_1_EDGE_BVH:
checkRing
Java
Tree1
(
lr
);
checkRingTree1
(
lr
);
break
;
break
;
case
TREE_2_EDGE_AND_VERTEX_BVH:
case
TREE_2_EDGE_AND_VERTEX_BVH:
checkRing
Java
Tree2
(
lr
);
checkRingTree2
(
lr
);
break
;
break
;
default
:
default
:
checkRing
Java
Old
(
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
checkRing
Java
Old
(
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
checkRing
Java
Tree1
(
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
checkRing
Java
Tree2
(
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment