[][src]Struct oxygengine_physics_2d::prelude::Compound

pub struct Compound<N> where
    N: RealField
{ /* fields omitted */ }

A compound shape with an aabb bounding volume.

A compound shape is a shape composed of the union of several simpler shape. This is the main way of creating a concave shape from convex parts. Each parts can have its own delta transformation to shift or rotate it with regard to the other shapes.

Implementations

impl<N> Compound<N> where
    N: RealField
[src]

pub fn new(
    shapes: Vec<(Isometry<N, U2, Unit<Complex<N>>>, ShapeHandle<N>)>
) -> Compound<N>
[src]

Builds a new compound shape.

impl<N> Compound<N> where
    N: RealField
[src]

pub fn shapes(&self) -> &[(Isometry<N, U2, Unit<Complex<N>>>, ShapeHandle<N>)]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

The shapes of this compound shape.

pub fn bvt(&self) -> &BVT<usize, AABB<N>>[src]

The optimization structure used by this compound shape.

pub fn aabb(&self) -> &AABB<N>[src]

The AABB of this compound in its local-space.

pub fn bounding_volumes(&self) -> &[AABB<N>]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

The shapes bounding volumes.

pub fn aabb_at(&self, i: usize) -> &AABB<N>[src]

The AABB of the i-th shape compositing this compound.

pub fn subshape_feature_id(&self, fid: FeatureId) -> (usize, FeatureId)[src]

Transforms a FeatureId of this compound into a pair containing the index of the subshape containing this feature, and the corresponding FeatureId on this subshape.

Trait Implementations

impl<N> Clone for Compound<N> where
    N: Clone + RealField
[src]

impl<N> CompositeShape<N> for Compound<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, AABB<N>> for Compound<N> where
    N: RealField
[src]

impl<N> HasBoundingVolume<N, BoundingSphere<N>> for Compound<N> where
    N: RealField
[src]

impl<N> PointQuery<N> for Compound<N> where
    N: RealField
[src]

impl<N> RayCast<N> for Compound<N> where
    N: RealField
[src]

impl<N> Shape<N> for Compound<N> where
    N: RealField
[src]

impl<N> Volumetric<N> for Compound<N> where
    N: RealField
[src]

fn mass_properties(
    &self,
    density: N
) -> (N, Point<N, U2>, Matrix<N, U1, U1, <DefaultAllocator as Allocator<N, U1, U1>>::Buffer>)
[src]

The mass properties of this CompoundData.

If density is not zero, it will be multiplied with the density of every object of the compound shape.

Auto Trait Implementations

impl<N> !RefUnwindSafe for Compound<N>

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

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

impl<N> Unpin for Compound<N> where
    N: Scalar + Unpin

impl<N> !UnwindSafe for Compound<N>

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

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

impl<T> Resource for T where
    T: Any, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<T> UserData for T where
    T: Clone + Send + Sync + Any
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,