Struct ncollide2d::query::Contact [−][src]
pub struct Contact<N: Real> { pub world1: Point<N>, pub world2: Point<N>, pub normal: Unit<Vector<N>>, pub depth: N, }
Geometric description of a contact.
Fields
world1: Point<N>
Position of the contact on the first object. The position is expressed in world space.
world2: Point<N>
Position of the contact on the second object. The position is expressed in world space.
normal: Unit<Vector<N>>
Contact normal
depth: N
Penetration depth
Methods
impl<N: Real> Contact<N>
[src]
impl<N: Real> Contact<N>
pub fn new(
world1: Point<N>,
world2: Point<N>,
normal: Unit<Vector<N>>,
depth: N
) -> Self
[src]
pub fn new(
world1: Point<N>,
world2: Point<N>,
normal: Unit<Vector<N>>,
depth: N
) -> Self
Creates a new contact.
pub fn new_wo_depth(
world1: Point<N>,
world2: Point<N>,
normal: Unit<Vector<N>>
) -> Contact<N>
[src]
pub fn new_wo_depth(
world1: Point<N>,
world2: Point<N>,
normal: Unit<Vector<N>>
) -> Contact<N>
Creates a new contact, computing automatically the penetration depth.
impl<N: Real> Contact<N>
[src]
impl<N: Real> Contact<N>
Trait Implementations
impl<N: Debug + Real> Debug for Contact<N>
[src]
impl<N: Debug + Real> Debug for Contact<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N: PartialEq + Real> PartialEq for Contact<N>
[src]
impl<N: PartialEq + Real> PartialEq for Contact<N>
fn eq(&self, other: &Contact<N>) -> bool
[src]
fn eq(&self, other: &Contact<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Contact<N>) -> bool
[src]
fn ne(&self, other: &Contact<N>) -> bool
This method tests for !=
.
impl<N: Clone + Real> Clone for Contact<N>
[src]
impl<N: Clone + Real> Clone for Contact<N>