Trait Primitive
Source pub trait Primitive {
// Required methods
fn world_bound(&self) -> Bounds3f;
fn intersect(&self, r: &Ray) -> Option<SurfaceInteraction>;
fn intersect_p(&self, r: &Ray) -> bool;
// Provided methods
fn get_area_light(&self) -> Option<Arc<dyn Light>> { ... }
fn get_material(&self) -> Option<Arc<dyn Material>> { ... }
fn compute_scattering_functions(
&self,
_si: &mut SurfaceInteraction,
_arena: &mut MemoryArena,
_mode: TransportMode,
_allow_multiple_lobes: bool,
) { ... }
fn is_geometric(&self) -> bool { ... }
}