Struct rhusics_core::Contact
[−]
[src]
pub struct Contact<P> where
P: EuclideanSpace, { pub strategy: CollisionStrategy, pub normal: <P as EuclideanSpace>::Diff, pub penetration_depth: <P as EuclideanSpace>::Scalar, pub contact_point: P, pub time_of_impact: <P as EuclideanSpace>::Scalar, }
Fields
strategy: CollisionStrategy
The collision strategy used for this contact.
normal: <P as EuclideanSpace>::Diff
The collision normal. Only applicable if the collision strategy is not CollisionOnly
penetration_depth: <P as EuclideanSpace>::Scalar
The penetration depth. Only applicable if the collision strategy is not CollisionOnly
contact_point: P
The contact point. Only applicable if the collision strategy is not CollisionOnly
time_of_impact: <P as EuclideanSpace>::Scalar
The time of impact, only applicable for continuous collision detection, value is in range 0.0..1.0
Methods
impl<P> Contact<P> where
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: VectorSpace,
<P as EuclideanSpace>::Diff: Zero,
[src]
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: VectorSpace,
<P as EuclideanSpace>::Diff: Zero,
pub fn new(strategy: CollisionStrategy) -> Contact<P>
[src]
Create a new contact manifold, with default collision normal and penetration depth
pub fn new_impl(
strategy: CollisionStrategy,
normal: <P as EuclideanSpace>::Diff,
penetration_depth: <P as EuclideanSpace>::Scalar
) -> Contact<P>
[src]
strategy: CollisionStrategy,
normal: <P as EuclideanSpace>::Diff,
penetration_depth: <P as EuclideanSpace>::Scalar
) -> Contact<P>
Create a new contact manifold, with the given collision normal and penetration depth
pub fn new_with_point(
strategy: CollisionStrategy,
normal: <P as EuclideanSpace>::Diff,
penetration_depth: <P as EuclideanSpace>::Scalar,
contact_point: P
) -> Contact<P>
[src]
strategy: CollisionStrategy,
normal: <P as EuclideanSpace>::Diff,
penetration_depth: <P as EuclideanSpace>::Scalar,
contact_point: P
) -> Contact<P>
Create a new contact manifold, complete with contact point
Trait Implementations
impl<P> Clone for Contact<P> where
P: Clone + EuclideanSpace,
<P as EuclideanSpace>::Diff: Clone,
<P as EuclideanSpace>::Scalar: Clone,
<P as EuclideanSpace>::Scalar: Clone,
[src]
P: Clone + EuclideanSpace,
<P as EuclideanSpace>::Diff: Clone,
<P as EuclideanSpace>::Scalar: Clone,
<P as EuclideanSpace>::Scalar: Clone,
fn clone(&self) -> Contact<P>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<P> Debug for Contact<P> where
P: Debug + EuclideanSpace,
<P as EuclideanSpace>::Diff: Debug,
<P as EuclideanSpace>::Scalar: Debug,
<P as EuclideanSpace>::Scalar: Debug,
[src]
P: Debug + EuclideanSpace,
<P as EuclideanSpace>::Diff: Debug,
<P as EuclideanSpace>::Scalar: Debug,
<P as EuclideanSpace>::Scalar: Debug,
Auto Trait Implementations
impl<P> Send for Contact<P> where
P: Send,
<P as EuclideanSpace>::Diff: Send,
<P as EuclideanSpace>::Scalar: Send,
P: Send,
<P as EuclideanSpace>::Diff: Send,
<P as EuclideanSpace>::Scalar: Send,
impl<P> Sync for Contact<P> where
P: Sync,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,
P: Sync,
<P as EuclideanSpace>::Diff: Sync,
<P as EuclideanSpace>::Scalar: Sync,