[][src]Trait mgf::Bound

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> + Volumetric + Overlaps<Self> + Contains<Self> {
    fn combine(_: &Self, _: &Self) -> 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 surface_area(&self) -> f32

Return a measure of the area of the object.

Loading content...

Implementors

impl Bound for AABB[src]

fn combine(a: &AABB, b: &AABB) -> AABB[src]

The returned AABB is the smallest volume possible that encloses both arguments. At least I think, I Can't remember if that claim is true. I'll have to check sometime.

impl Bound for Sphere[src]

Loading content...