Trait mgf::Bound
[−]
[src]
pub trait Bound: Copy + Add<Vector3<f32>, Output = Self> + Sub<Vector3<f32>, Output = Self> + Mul<f32, Output = Self> + Div<f32, Output = Self> + Add<f32, Output = Self> + Sub<f32, Output = Self> + Shape + Overlaps<Self> + Contains<Self> { fn combine(_: &Self, _: &Self) -> Self; fn rotate(&self, _: Quaternion<f32>) -> Self; fn surface_area(&self) -> f32; }
A type that can overlap, contain, and be combined with one another.
Bounds can also be scaled and extended by scalar values to produce proxy volumes. They can also be rotated and have a surface area.
Bounds are Shapes and thus have a center and can be displaced.
Required Methods
fn combine(_: &Self, _: &Self) -> Self
Produce a bound that encloses the two arguments.
fn rotate(&self, _: Quaternion<f32>) -> Self
Rotate the bound in place. This is useless for spheres.
fn surface_area(&self) -> f32
Return a measure of the area of the object.