[−][src]Struct mgf::Compound
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: SmallVec<[usize; 1]>
Indices of the geometries composing the compound in the BVH. One-to-one with the constructing vector.
bvh: BVH<AABB, Component>
BVH storing the components to improve collision efficiency.
Methods
impl Compound
[src]
Trait Implementations
impl AddAssign<Vector3<f32>> for Compound
[src]
fn add_assign(&mut self, v: Vector3<f32>)
[src]
impl BoundedBy<AABB> for Compound
[src]
impl BoundedBy<Sphere> for Compound
[src]
impl Clone for Compound
[src]
impl<RHS> Contacts<RHS> for Compound where
RHS: Contacts<Component> + BoundedBy<AABB>,
[src]
RHS: Contacts<Component> + BoundedBy<AABB>,
fn contacts<F: FnMut(Contact)>(&self, rhs: &RHS, callback: F) -> bool
[src]
fn last_contact(&self, rhs: &RHS) -> Option<Contact>
[src]
impl<P: Particle> Intersects<Compound> for P
[src]
fn intersection(&self, rhs: &Compound) -> Option<Intersection>
[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 closest_point(&self, to: Point3<f32>) -> Point3<f32>
[src]
fn set_pos(&mut self, p: Point3<f32>)
[src]
impl SubAssign<Vector3<f32>> for Compound
[src]
fn sub_assign(&mut self, v: Vector3<f32>)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Compound
impl Send for Compound
impl Sync for Compound
impl Unpin for Compound
impl UnwindSafe for Compound
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,