Struct bsp_pathfinding::BSPNode
source · [−]pub struct BSPNode { /* private fields */ }
Expand description
Represents a single node in the binary tree. The node constitutes of a splitting plane and children behind and in front of the plane.
A node can be double planar, which means that the partitioning plane contains two faces with opposite facing normals.
Implementations
Creates a new BSPNode and inserts it into nodes. Returns None if there were not faces to create a node from
pub fn descendants(
index: NodeIndex,
nodes: &SlotMap<NodeIndex, BSPNode>
) -> Descendants<'_>ⓘNotable traits for Descendants<'a>impl<'a> Iterator for Descendants<'a> type Item = (NodeIndex, &'a BSPNode);
Notable traits for Descendants<'a>
impl<'a> Iterator for Descendants<'a> type Item = (NodeIndex, &'a BSPNode);
Clips a face by the BSP faces and returns several smaller faces
pub fn generate_portals(
index: NodeIndex,
nodes: &SlotMap<NodeIndex, BSPNode>,
clipping_planes: &Vector<Face>,
result: &mut impl Extend<ClippedFace>
)
Get the bspnode’s double planar.