Struct ncollide::query::Contact
[−]
[src]
pub struct Contact<P> where
P: Point, { pub world1: P, pub world2: P, pub normal: <P as Point>::Vector, pub depth: <P as EuclideanSpace>::Real, }
Geometric description of a contact.
Fields
world1: P
Position of the contact on the first object. The position is expressed in world space.
world2: P
Position of the contact on the second object. The position is expressed in world space.
normal: <P as Point>::Vector
Contact normal
depth: <P as EuclideanSpace>::Real
Penetration depth
Methods
impl<P> Contact<P> where
P: Point,
[src]
P: Point,
fn new(
world1: P,
world2: P,
normal: <P as Point>::Vector,
depth: <P as EuclideanSpace>::Real
) -> Contact<P>
world1: P,
world2: P,
normal: <P as Point>::Vector,
depth: <P as EuclideanSpace>::Real
) -> Contact<P>
Creates a new contact.
impl<P> Contact<P> where
P: Point,
[src]
P: Point,
fn flip(&mut self)
Reverts the contact normal and swaps world1
and world2
.
Trait Implementations
impl<P> Clone for Contact<P> where
P: Clone + Point,
<P as Point>::Vector: Clone,
<P as EuclideanSpace>::Real: Clone,
[src]
P: Clone + Point,
<P as Point>::Vector: Clone,
<P as EuclideanSpace>::Real: Clone,
impl<P> Decodable for Contact<P> where
P: Decodable + Point,
<P as Point>::Vector: Decodable,
<P as EuclideanSpace>::Real: Decodable,
[src]
P: Decodable + Point,
<P as Point>::Vector: Decodable,
<P as EuclideanSpace>::Real: Decodable,
fn decode<__DP>(
__arg_0: &mut __DP
) -> Result<Contact<P>, <__DP as Decoder>::Error> where
__DP: Decoder,
__arg_0: &mut __DP
) -> Result<Contact<P>, <__DP as Decoder>::Error> where
__DP: Decoder,
impl<P> Encodable for Contact<P> where
P: Encodable + Point,
<P as Point>::Vector: Encodable,
<P as EuclideanSpace>::Real: Encodable,
[src]
P: Encodable + Point,
<P as Point>::Vector: Encodable,
<P as EuclideanSpace>::Real: Encodable,
fn encode<__SP>(
&self,
__arg_0: &mut __SP
) -> Result<(), <__SP as Encoder>::Error> where
__SP: Encoder,
&self,
__arg_0: &mut __SP
) -> Result<(), <__SP as Encoder>::Error> where
__SP: Encoder,
impl<P> Debug for Contact<P> where
P: Debug + Point,
<P as Point>::Vector: Debug,
<P as EuclideanSpace>::Real: Debug,
[src]
P: Debug + Point,
<P as Point>::Vector: Debug,
<P as EuclideanSpace>::Real: Debug,
impl<P> PartialEq<Contact<P>> for Contact<P> where
P: PartialEq<P> + Point,
<P as Point>::Vector: PartialEq<<P as Point>::Vector>,
<P as EuclideanSpace>::Real: PartialEq<<P as EuclideanSpace>::Real>,
[src]
P: PartialEq<P> + Point,
<P as Point>::Vector: PartialEq<<P as Point>::Vector>,
<P as EuclideanSpace>::Real: PartialEq<<P as EuclideanSpace>::Real>,