Struct bsp_pathfinding::BSPTree
source · [−]pub struct BSPTree { /* private fields */ }
Expand description
Defines the tree used for navigation
Implementations
sourceimpl BSPTree
impl BSPTree
sourcepub fn new(faces: impl Iterator<Item = Face>) -> Option<Self>
pub fn new(faces: impl Iterator<Item = Face>) -> Option<Self>
Constructs a new tree. Returns None if there are not faces, and root construction was not possible
pub fn new_shuffle(
faces: impl Iterator<Item = Face>,
rng: &mut impl Rng
) -> Option<Self>
pub fn node(&self, index: NodeIndex) -> Option<&BSPNode>
pub fn descendants(&self) -> Descendants<'_>ⓘNotable traits for Descendants<'a>impl<'a> Iterator for Descendants<'a> type Item = (NodeIndex, &'a BSPNode);
sourcepub fn locate(&self, point: Vec2) -> NodePayload<'_>
pub fn locate(&self, point: Vec2) -> NodePayload<'_>
Returns the containing node and if the point is covered
sourcepub fn clipping_planes(&self) -> [Face; 4]
pub fn clipping_planes(&self) -> [Face; 4]
Returns clipping planes which contain the scene
pub fn generate_portals(&self) -> Vec<ClippedFace>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BSPTree
impl Send for BSPTree
impl Sync for BSPTree
impl Unpin for BSPTree
impl UnwindSafe for BSPTree
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more