Trait mgf::Shape
[−]
[src]
pub trait Shape: AddAssign<Vector3<f32>> + SubAssign<Vector3<f32>> { fn center(&self) -> Point3<f32>; fn set_pos(&mut self, p: Point3<f32>) { ... } }
A type that describes a set of points in space.
Shape is usually used to describe static static objects such as a regular
Sphere
or Capsule
. It allows for these shapes to be decomposed into
some arbitrary center point and displaced by Vectors.
Required Methods
fn center(&self) -> Point3<f32>
Returns the center of mass of the geometry, assuming a regular density.
Provided Methods
Implementors
impl Shape for Component
impl Shape for Compound
impl Shape for Plane
impl Shape for Ray
impl Shape for Segment
impl Shape for Triangle
impl Shape for Rectangle
impl Shape for AABB
impl Shape for Sphere
impl Shape for Capsule
impl Shape for Mesh
impl Shape for CompoundDynamicBody
impl<S> Shape for SimpleDynamicBody<S> where
S: Volumetric + Inertia + Copy,