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.