pub struct BvhSystem { /* private fields */ }Implementations§
Source§impl BvhSystem
impl BvhSystem
pub fn has_index(&self) -> bool
pub fn queue_renderable_added(&mut self, component: ComponentId)
pub fn queue_renderable_removed(&mut self, component: ComponentId)
Sourcepub fn queue_transform_subtree(
&mut self,
world: &World,
transform_root: ComponentId,
)
pub fn queue_transform_subtree( &mut self, world: &World, transform_root: ComponentId, )
Queue all renderables under the given transform subtree for BVH refit.
Sourcepub fn flush_pending(&mut self, world: &World)
pub fn flush_pending(&mut self, world: &World)
Apply any queued add/remove/refit requests.
Intended to be called once after CommandQueue::flush completes.
pub fn raycast_renderables( &self, origin: [f32; 3], dir: [f32; 3], max_distance: f32, ) -> Option<(ComponentId, f32)>
Sourcepub fn raycast_renderables_candidates(
&self,
origin: [f32; 3],
dir: [f32; 3],
max_distance: f32,
limit: usize,
) -> Vec<(ComponentId, f32)>
pub fn raycast_renderables_candidates( &self, origin: [f32; 3], dir: [f32; 3], max_distance: f32, limit: usize, ) -> Vec<(ComponentId, f32)>
Return ray/AABB hit candidates (sorted by ascending t).
This is intended to support narrow-phase hit tests that may reject the closest AABB hit and need to fall through to the next-best candidates.
pub fn query_point(&self, point: [f32; 3]) -> Vec<ComponentId>
pub fn query_aabb(&self, min: [f32; 3], max: [f32; 3]) -> Vec<ComponentId>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BvhSystem
impl RefUnwindSafe for BvhSystem
impl Send for BvhSystem
impl Sync for BvhSystem
impl Unpin for BvhSystem
impl UnsafeUnpin for BvhSystem
impl UnwindSafe for BvhSystem
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.