[][src]Trait oxygengine_physics_2d::prelude::ncollide2d::shape::SupportMap

pub trait SupportMap<N> where
    N: RealField
{ fn support_point(
        &self,
        transform: &Isometry<N, U2, Unit<Complex<N>>>,
        dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
    ) -> Point<N, U2>; fn support_point_toward(
        &self,
        transform: &Isometry<N, U2, Unit<Complex<N>>>,
        dir: &Unit<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>>
    ) -> Point<N, U2> { ... } }

Traits of convex shapes representable by a support mapping function.

Parameters:

  • V - type of the support mapping direction argument and of the returned point.

Required methods

fn support_point(
    &self,
    transform: &Isometry<N, U2, Unit<Complex<N>>>,
    dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> Point<N, U2>

Evaluates the support function of the object.

A support function is a function associating a vector to the shape point which maximizes their dot product.

Loading content...

Provided methods

fn support_point_toward(
    &self,
    transform: &Isometry<N, U2, Unit<Complex<N>>>,
    dir: &Unit<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>>
) -> Point<N, U2>

Same as self.support_point except that dir is normalized.

Loading content...

Implementors

impl<'a, N, S> SupportMap<N> for DilatedShape<'a, N, S> where
    N: RealField,
    S: SupportMap<N> + ?Sized
[src]

impl<N> SupportMap<N> for ConstantOrigin where
    N: RealField
[src]

impl<N> SupportMap<N> for Ball<N> where
    N: RealField
[src]

impl<N> SupportMap<N> for Capsule<N> where
    N: RealField
[src]

impl<N> SupportMap<N> for ConvexPolygon<N> where
    N: RealField
[src]

impl<N> SupportMap<N> for Cuboid<N> where
    N: RealField
[src]

impl<N> SupportMap<N> for Segment<N> where
    N: RealField
[src]

impl<N> SupportMap<N> for Triangle<N> where
    N: RealField
[src]

Loading content...