Trait mgf::Shape[][src]

pub trait Shape: AddAssign<Vector3<f32>> + SubAssign<Vector3<f32>> {
    fn center(&self) -> Point3<f32>;
fn closest_point(&self, to: Point3<f32>) -> 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

Returns the center of mass of the geometry, assuming a regular density.

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

Provided Methods

Sets the center of the shape to p.

Implementors