Interface Octree

All Superinterfaces:
Serializable
All Known Implementing Classes:
OctreeImpl

public interface Octree extends Serializable
Octree for storing vertices (MeshPoints) of triangular meshes (MeshFacets). 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 Details Link icon

    • create Link icon

      static Octree create(MeshFacet facet)
      Creates a new OctTree.
      Parameters:
      facet - Mesh facet
      Returns:
      a new OctTree
    • create Link icon

      static Octree create(MeshModel mesh)
      Creates a new OctTree.
      Parameters:
      mesh - Mesh model
      Returns:
      a new OctTree
    • create Link icon

      static Octree create(Collection<MeshFacet> facets)
      Creates a new OctTree. If no mesh points (vertices) are provided, then an empty Octree 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 the Octree.
      Parameters:
      facets - The list of mesh facets to be stored. Facets can share
      Returns:
      a new OctTree
    • getRoot Link icon

      OctNode getRoot()
      Tree traversal - go to the "root" of the tree.
      Returns:
      root node of the tree
    • getMinLen Link icon

      Double getMinLen()
      Returns:
      distance of the smallest cell in Octree.
    • accept Link icon

      void accept(OctreeVisitor visitor)
      Visits this tree.
      Parameters:
      visitor - Visitor