[][src]Trait tray_rust::geometry::Geometry

pub trait Geometry {
    fn intersect(&self, ray: &mut Ray) -> Option<DifferentialGeometry>;
}

Trait implemented by geometric primitives

Required methods

fn intersect(&self, ray: &mut Ray) -> Option<DifferentialGeometry>

Test a ray for intersection with the geometry. The ray should have been previously transformed into the geometry's object space otherwise the test will be incorrect. Returns the differential geometry containing the hit information if the ray hit the object and set's the ray's max_t member accordingly

Loading content...

Implementors

impl Geometry for AnimatedMesh[src]

impl Geometry for AnimatedTriangle[src]

impl Geometry for Disk[src]

impl Geometry for Mesh[src]

impl Geometry for Triangle[src]

impl Geometry for Rectangle[src]

impl Geometry for Sphere[src]

Loading content...