pub struct BSPTree { /* private fields */ }
Expand description
Defines the tree used for navigation
Implementations§
Source§impl 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<'_> ⓘ
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 Freeze for BSPTree
impl RefUnwindSafe for BSPTree
impl Send for BSPTree
impl Sync for BSPTree
impl Unpin for BSPTree
impl UnwindSafe for BSPTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more