Struct heron::rapier_plugin::rapier2d::parry::query::ContactManifold [−][src]
pub struct ContactManifold<ManifoldData, ContactData> {
pub points: ArrayVec<TrackedContact<ContactData>, 2_usize>,
pub local_n1: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>,
pub local_n2: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>,
pub subshape1: u32,
pub subshape2: u32,
pub subshape_pos1: Option<Isometry<f32, Unit<Complex<f32>>, 2_usize>>,
pub subshape_pos2: Option<Isometry<f32, Unit<Complex<f32>>, 2_usize>>,
pub data: ManifoldData,
}
Expand description
A contact manifold between two shapes.
A contact manifold describes a set of contacts between two shapes. All the contact part of the same contact manifold share the same contact normal and contact kinematics.
Fields
points: ArrayVec<TrackedContact<ContactData>, 2_usize>
The contacts points.
local_n1: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>
The contact normal of all the contacts of this manifold, expressed in the local space of the first shape.
local_n2: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 2_usize, 1_usize>>
The contact normal of all the contacts of this manifold, expressed in the local space of the second shape.
subshape1: u32
The first subshape involved in this contact manifold.
This is zero if the first shape is not a composite shape.
subshape2: u32
The second subshape involved in this contact manifold.
This is zero if the second shape is not a composite shape.
subshape_pos1: Option<Isometry<f32, Unit<Complex<f32>>, 2_usize>>
If the first shape involved is a composite shape, this contains the position of its subshape involved in this contact.
subshape_pos2: Option<Isometry<f32, Unit<Complex<f32>>, 2_usize>>
If the second shape involved is a composite shape, this contains the position of its subshape involved in this contact.
data: ManifoldData
Additional tracked data associated to this contact manifold.
Implementations
impl<ManifoldData, ContactData> ContactManifold<ManifoldData, ContactData> where
ContactData: Default + Copy,
impl<ManifoldData, ContactData> ContactManifold<ManifoldData, ContactData> where
ContactData: Default + Copy,
Create a new empty contact-manifold.
pub fn with_data(
subshape1: u32,
subshape2: u32,
data: ManifoldData
) -> ContactManifold<ManifoldData, ContactData>
pub fn with_data(
subshape1: u32,
subshape2: u32,
data: ManifoldData
) -> ContactManifold<ManifoldData, ContactData>
Create a new empty contact-manifold with the given associated data.
pub fn take(&mut self) -> ContactManifold<ManifoldData, ContactData> where
ManifoldData: Clone,
pub fn take(&mut self) -> ContactManifold<ManifoldData, ContactData> where
ManifoldData: Clone,
Clones self
and then remove all contact points from self
.
The slice of all the contacts, active or not, on this contact manifold.
Attempts to use spatial coherence to update contacts points.
Attempts to use spatial coherence to update contacts points, using user-defined tolerances.
Copy data associated to contacts from old_contacts
to the new contacts in self
based on matching their feature-ids.
pub fn match_contacts_using_positions(
&mut self,
old_contacts: &[TrackedContact<ContactData>],
dist_threshold: f32
)
pub fn match_contacts_using_positions(
&mut self,
old_contacts: &[TrackedContact<ContactData>],
dist_threshold: f32
)
Copy data associated to contacts from old_contacts
to the new contacts in self
based on matching the contact positions.
Returns the contact with the smallest distance (i.e. the largest penetration depth).
Trait Implementations
Auto Trait Implementations
impl<ManifoldData, ContactData> RefUnwindSafe for ContactManifold<ManifoldData, ContactData> where
ContactData: RefUnwindSafe,
ManifoldData: RefUnwindSafe,
impl<ManifoldData, ContactData> Send for ContactManifold<ManifoldData, ContactData> where
ContactData: Send,
ManifoldData: Send,
impl<ManifoldData, ContactData> Sync for ContactManifold<ManifoldData, ContactData> where
ContactData: Sync,
ManifoldData: Sync,
impl<ManifoldData, ContactData> Unpin for ContactManifold<ManifoldData, ContactData> where
ContactData: Unpin,
ManifoldData: Unpin,
impl<ManifoldData, ContactData> UnwindSafe for ContactManifold<ManifoldData, ContactData> where
ContactData: UnwindSafe,
ManifoldData: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more