[][src]Struct ncollide3d::query::algorithms::CSOPoint

pub struct CSOPoint<N: Real> {
    pub point: Point<N>,
    pub orig1: Point<N>,
    pub orig2: Point<N>,
}

A point of a Configuration-Space Obstacle.

A Configuration-Space Obstacle (CSO) is the result of the Minkowski Difference of two solids. In other words, each of its points correspond to the difference of two point, each belonging to a different solid.

Fields

point: Point<N>

The point on the CSO. This is equal to self.orig1 - self.orig2.

orig1: Point<N>

The original point on the first shape used to compute self.point.

orig2: Point<N>

The original point on the second shape used to compute self.point.

Methods

impl<N: Real> CSOPoint<N>[src]

pub fn new(orig1: Point<N>, orig2: Point<N>) -> Self[src]

Initializes a CSO point with orig1 - orig2.

pub fn new_with_point(point: Point<N>, orig1: Point<N>, orig2: Point<N>) -> Self[src]

Initializes a CSO point with all information provided.

It is assumed, but not checked, that point == orig1 - orig2.

pub fn single_point(point: Point<N>) -> Self[src]

Initializes a CSO point where both original points are equal.

pub fn origin() -> Self[src]

CSO point where all components are set to zero.

pub fn from_shapes_toward<G1: ?Sized, G2: ?Sized>(
    m1: &Isometry<N>,
    g1: &G1,
    m2: &Isometry<N>,
    g2: &G2,
    dir: &Unit<Vector<N>>
) -> Self where
    G1: SupportMap<N>,
    G2: SupportMap<N>, 
[src]

Computes the support point of the CSO of g1 and g2 toward the unit direction dir.

pub fn from_shapes<G1: ?Sized, G2: ?Sized>(
    m1: &Isometry<N>,
    g1: &G1,
    m2: &Isometry<N>,
    g2: &G2,
    dir: &Vector<N>
) -> Self where
    G1: SupportMap<N>,
    G2: SupportMap<N>, 
[src]

Computes the support point of the CSO of g1 and g2 toward the direction dir.

pub fn translate1(&self, dir: &Vector<N>) -> Self[src]

Translate the first original point of this CSO point.

This will apply the same translation to self.point.

pub fn translate2(&self, dir: &Vector<N>) -> Self[src]

Translate the second original point of this CSO point.

This will apply the opposite translation to self.point.

pub fn translate1_mut(&mut self, dir: &Vector<N>)[src]

Translate in-place the first original point of this CSO point.

This will apply the same translation to self.point.

pub fn translate2_mut(&mut self, dir: &Vector<N>)[src]

Translate in-place the second original point of this CSO point.

This will apply the opposite translation to self.point.

Trait Implementations

impl<N: Clone + Real> Clone for CSOPoint<N>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: PartialEq + Real> PartialEq<CSOPoint<N>> for CSOPoint<N>[src]

impl<N: Copy + Real> Copy for CSOPoint<N>[src]

impl<N: Debug + Real> Debug for CSOPoint<N>[src]

impl<N: Real> Sub<CSOPoint<N>> for CSOPoint<N>[src]

type Output = Vector<N>

The resulting type after applying the - operator.

Auto Trait Implementations

impl<N> Send for CSOPoint<N> where
    N: Scalar

impl<N> Sync for CSOPoint<N> where
    N: Scalar

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Any + Debug
[src]

fn is<T>() -> bool where
    T: Scalar
[src]

Tests if Self the same as the type T Read more

impl<T> Same for T

type Output = T

Should always be Self