Trait Shape

Source
pub trait Shape<S>: Aabb<S>
where S: Ring,
{ }
Expand description

A trait for bounded and unbounded shapes.

A ‘Shape’ implements the following traits:

  • ‘Aabb’ – a shape can compute the axis-aligned bounding volume that encloses it
  • ‘Bsphere’ – TODO: a shape can compute its bounding sphere

Both of these traits carry the constraint that a shape implements the ‘Stereometric’ trait which allows a shape to compute its volume (non-zero, possibly infinite).

Implementors§

Source§

impl Shape<f64> for Dynamic

Source§

impl Shape<f64> for Static

Source§

impl<S> Shape<S> for Bounded<S>
where S: Real + Debug,

Source§

impl<S> Shape<S> for Unbounded<S>
where S: Real + FloatCore + Debug,

Source§

impl<S> Shape<S> for Variant<S>
where S: Real + FloatCore + Debug,

Source§

impl<S> Shape<S> for Capsule<S>
where S: Real + Debug,

Source§

impl<S> Shape<S> for Cone<S>
where S: Real + Debug,

Source§

impl<S> Shape<S> for Cube<S>
where S: Field + Debug,

Source§

impl<S> Shape<S> for Cuboid<S>
where S: Field + Debug,

Source§

impl<S> Shape<S> for Cylinder<S>
where S: Real + Debug,

Source§

impl<S> Shape<S> for Halfspace<S>
where S: Real + FloatCore + Debug,

Source§

impl<S> Shape<S> for Orthant
where S: Field + FloatCore + Debug,

Source§

impl<S> Shape<S> for Sphere<S>
where S: Real + Debug,