Struct mgf::Compound
[−]
[src]
pub struct Compound { pub disp: Vector3<f32>, pub rot: Quaternion<f32>, pub shapes: Vec<Component>, pub bvh: BVH<AABB, usize>, }
An aggregate structure of Spheres and Capsules. Has a position and rotation.
Fields
disp: Vector3<f32>
The displacement of the object.
rot: Quaternion<f32>
The rotation of the object. Assumed to be normalized.
shapes: Vec<Component>
The geometries the compound is composed of.
bvh: BVH<AABB, usize>
BVH storing the bounds of the components to improve collision efficiency.
Methods
impl Compound
[src]
Trait Implementations
impl Clone for Compound
[src]
fn clone(&self) -> Compound
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl AddAssign<Vector3<f32>> for Compound
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
Performs the +=
operation.
impl SubAssign<Vector3<f32>> for Compound
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
Performs the -=
operation.
impl BoundedBy<AABB> for Compound
[src]
impl BoundedBy<Sphere> for Compound
[src]
impl Shape for Compound
[src]
fn center(&self) -> Point3<f32>
[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.
fn set_pos(&mut self, p: Point3<f32>)
[src]
Sets the center of the shape to p.
impl<RHS> Contacts<RHS> for Compound where
RHS: Contacts<Component> + BoundedBy<AABB>,
[src]
RHS: Contacts<Component> + BoundedBy<AABB>,