[][src]Trait tray_rust::geometry::Boundable

pub trait Boundable {
    fn bounds(&self, start: f32, end: f32) -> BBox;

    fn update_deformation(&mut self, start: f32, end: f32) { ... }
}

Trait implemented by scene objects that can report an AABB describing their bounds

Required methods

fn bounds(&self, start: f32, end: f32) -> BBox

Get an AABB reporting the object's bounds over the time period The default implementation assumes the object isn't animated and simply returns its bounds. This is kind of a hack to use the BVH for animated geomtry (instances) and non-animated geometry (triangles).

Loading content...

Provided methods

fn update_deformation(&mut self, start: f32, end: f32)

Have the object recompute its bounds for the time range. In the case of deforming geometry this can rebuild acceleration structures for example.

Loading content...

Implementors

impl Boundable for Instance[src]

impl Boundable for AnimatedMesh[src]

impl Boundable for AnimatedTriangle[src]

impl Boundable for Disk[src]

impl Boundable for Emitter[src]

impl Boundable for Mesh[src]

impl Boundable for Triangle[src]

impl Boundable for Receiver[src]

impl Boundable for Rectangle[src]

impl Boundable for Sphere[src]

impl<T: Boundable> Boundable for BVH<T>[src]

Loading content...