Package cz.fidentis.analyst.data.octree
Interface Octree
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
OctreeImpl
Octree
for storing vertices (MeshPoint
s) of triangular meshes
(MeshFacet
s). Multiple mesh facets can be stored in a single
Octree
. In this case, vertices that are shared across multiple facets
(have the same 3D location) are shared in the same node of the
Octree
.
Triangles are stored in leaves. If a triangle intersects multiple leaves, then it is stored in all of them. The intersection of bounding boxes is used to detect whether a triangle intersects an octree node.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(OctreeVisitor visitor) Visits this tree.static Octree
Creates a new OctTree.static Octree
Creates a new OctTree.static Octree
create
(Collection<MeshFacet> facets) Creates a new OctTree.getRoot()
Tree traversal - go to the "root" of the tree.
-
Method Details
-
create
Creates a new OctTree.- Parameters:
facet
- Mesh facet- Returns:
- a new OctTree
-
create
Creates a new OctTree.- Parameters:
mesh
- Mesh model- Returns:
- a new OctTree
-
create
Creates a new OctTree. If no mesh points (vertices) are provided, then an emptyOctree
is constructed (with the root node set to null). If multiple mesh facets share the same vertex, then they are stored efficiently in the same node of theOctree
.- Parameters:
facets
- The list of mesh facets to be stored. Facets can share- Returns:
- a new OctTree
-
getRoot
OctNode getRoot()Tree traversal - go to the "root" of the tree.- Returns:
- root node of the tree
-
getMinLen
Double getMinLen()- Returns:
- distance of the smallest cell in
Octree
.
-
accept
Visits this tree.- Parameters:
visitor
- Visitor
-