pub trait Shape: Pack + Instance<ShapeClass> {
// Provided methods
fn map<M: Map>(self, map: M) -> ShapeMapper<Self, M> { ... }
fn cover<M: Material>(self, material: M) -> Covered<Self, M> { ... }
}
Expand description
Shape of an object.
It defines the search of the point where ray intersects this shape.
Provided Methods§
Sourcefn map<M: Map>(self, map: M) -> ShapeMapper<Self, M>
fn map<M: Map>(self, map: M) -> ShapeMapper<Self, M>
Creates a new shape by applying some kind of mapping to previous one.
Most common use case is applying affine transform to some unit shape.
(see map::Affine
)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.