Package cz.fidentis.analyst.data.kdtree
Interface KdNode
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
KdNodeImpl
A single node of a KD-tree. Sharing vertices across meshes is supported
(the node links all faces that share the same vertex).
-
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Returns depth of the node in the tree.Returns a map of all mesh facets that share the stored vertex.Tree traversal - go to the "grater" child.Tree traversal - go to the "lesser" child.javax.vecmath.Point3d
Returns 3D location of vertices stored in this nodesetGreater
(KdNode greater) Set lesser node.Set lesser node.
-
Method Details
-
getDepth
int getDepth()Returns depth of the node in the tree.- Returns:
- depth of the node in the tree.
-
getLocation
javax.vecmath.Point3d getLocation()Returns 3D location of vertices stored in this node- Returns:
- 3D location of vertices stored in this node
-
getLesser
KdNode getLesser()Tree traversal - go to the "lesser" child.- Returns:
- lesser node, null if current node is leaf
-
getGreater
KdNode getGreater()Tree traversal - go to the "grater" child.- Returns:
- greater node, null if current node is leaf
-
setLesser
Set lesser node.- Parameters:
lesser
- Node to be set as lesser- Returns:
- current node
-
setGreater
Set lesser node.- Parameters:
greater
- Node to be set as greater- Returns:
- current node
-
getFacets
Returns a map of all mesh facets that share the stored vertex. Value in the map contains the index which the vertex is stored in the mesh facet.- Returns:
- Map of facets sharing the stored mesh vertex
-