Struct mgf::Compound[][src]

pub struct Compound {
    pub disp: Vector3<f32>,
    pub rot: Quaternion<f32>,
    pub shapes: SmallVec<[usize; 1]>,
    pub bvh: BVH<AABB, Component>,
}

An aggregate structure of Spheres and Capsules. Has a position and rotation.

Fields

The displacement of the object.

The rotation of the object. Assumed to be normalized.

Indices of the geometries composing the compound in the BVH. One-to-one with the constructing vector.

BVH storing the components to improve collision efficiency.

Methods

impl Compound
[src]

Trait Implementations

impl Clone for Compound
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl AddAssign<Vector3<f32>> for Compound
[src]

Performs the += operation.

impl SubAssign<Vector3<f32>> for Compound
[src]

Performs the -= operation.

impl BoundedBy<AABB> for Compound
[src]

impl BoundedBy<Sphere> for Compound
[src]

impl Shape for Compound
[src]

The point returned by a compound shape is the displacement of the object and not the center of mass. It is impossible for Compound to calculate the center of mass given it has no information regarding the mass of individual components.

Returns the closest point on the shape to the given point.

Sets the center of the shape to p.

impl<P: Particle> Intersects<Compound> for P
[src]

Returns an Intersection if one exists.

impl<RHS> Contacts<RHS> for Compound where
    RHS: Contacts<Component> + BoundedBy<AABB>, 
[src]

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

Auto Trait Implementations

impl Send for Compound

impl Sync for Compound