Struct nphysics3d::object::ColliderData [−][src]
pub struct ColliderData<N: RealField + Copy, Handle: BodyHandle> { /* fields omitted */ }
Expand description
Data stored in each collider.
This is needed by nphysics.
Implementations
pub fn new(
margin: N,
density: N,
anchor: ColliderAnchor<N, Handle>,
body_status_dependent_ndofs: usize,
material: MaterialHandle<N>
) -> Self
pub fn new(
margin: N,
density: N,
anchor: ColliderAnchor<N, Handle>,
body_status_dependent_ndofs: usize,
material: MaterialHandle<N>
) -> Self
Initializes data for a collider.
Retrieves a reference to the user-defined user-data attached to this object.
Retrieves a mutable reference to the user-defined user-data attached to this object.
Sets the user-defined data attached to this object.
Replace by None
the user-defined data attached to this object and returns the old value.
The anchor attaching this collider with a body part or deformable body.
The position of this collider geometry wrt. the body it is attached to.
Handle to the body part containing the given subshape of this collider’s shape.
A mutable reference to this collider’s material.
If the material is shared, then an internal clone is performed
before returning the mutable reference (this effectively calls
the Arc::make_mut
method to get a copy-on-write behavior).
Auto Trait Implementations
impl<N, Handle> !RefUnwindSafe for ColliderData<N, Handle>
impl<N, Handle> Send for ColliderData<N, Handle>
impl<N, Handle> Sync for ColliderData<N, Handle>
impl<N, Handle> Unpin for ColliderData<N, Handle> where
Handle: Unpin,
N: Unpin,
impl<N, Handle> !UnwindSafe for ColliderData<N, Handle>
Blanket Implementations
Mutably borrows from an owned value. Read more
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
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
Checks if self
is actually part of its subset T
(and can be converted to it).
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
The inclusion map: converts self
to the equivalent element of its superset.