Struct rafx_framework::visibility::VisibilityResource
source · pub struct VisibilityResource { /* private fields */ }
Implementations§
source§impl VisibilityResource
impl VisibilityResource
pub fn new() -> Self
pub fn world(&self) -> &VisibilityWorld
pub fn update(&mut self)
pub fn register_view_frustum(&mut self) -> ViewFrustumArc
pub fn register_static_view_frustum(&mut self) -> ViewFrustumArc
pub fn register_dynamic_view_frustum(&mut self) -> ViewFrustumArc
sourcepub fn register_static_object(
&mut self,
object_id: ObjectId,
cull_model: CullModel,
render_objects: Vec<RenderObjectHandle>
) -> VisibilityObjectArc
pub fn register_static_object( &mut self, object_id: ObjectId, cull_model: CullModel, render_objects: Vec<RenderObjectHandle> ) -> VisibilityObjectArc
Returns a smart pointer to a handle representing a static object. A static object is a hint to the visibility world that the object’s transform changes rarely. Most geometry in the world is static – buildings, trees, rocks, grass, and so on.
sourcepub fn register_dynamic_object(
&mut self,
object_id: ObjectId,
cull_model: CullModel,
render_objects: Vec<RenderObjectHandle>
) -> VisibilityObjectArc
pub fn register_dynamic_object( &mut self, object_id: ObjectId, cull_model: CullModel, render_objects: Vec<RenderObjectHandle> ) -> VisibilityObjectArc
Returns a smart pointer to a handle representing a dynamic object. A dynamic object is a hint to the visibility world that the object’s transform changes often. Characters, projectiles, vehicles, and moving platforms are examples of dynamic geometry.
pub fn visibility_object_arc( &self, id: VisibilityObjectId ) -> Option<VisibilityObjectArc>
pub fn visibility_object_info( &self, id: VisibilityObjectId ) -> Option<VisibilityObjectInfo<'_>>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for VisibilityResource
impl Send for VisibilityResource
impl Sync for VisibilityResource
impl Unpin for VisibilityResource
impl UnwindSafe for VisibilityResource
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.