pub trait Render<V: Vary> {
type Clip;
type Clips: Clip<Item = Self::Clip> + ?Sized;
type Screen;
// Required methods
fn inline(ixd: Self, vs: &[ClipVert<V>]) -> Self::Clip;
fn to_screen(clip: Self::Clip, tf: &Mat4x4<NdcToScreen>) -> Self::Screen;
fn rasterize<F: FnMut(Scanline<V>)>(scr: Self::Screen, scanline_fn: F);
// Provided methods
fn depth(_clip: &Self::Clip) -> f32 { ... }
fn is_backface(_: &Self::Screen) -> bool { ... }
}Expand description
Renderable geometric primitive.
Required Associated Types§
Required Methods§
Sourcefn inline(ixd: Self, vs: &[ClipVert<V>]) -> Self::Clip
fn inline(ixd: Self, vs: &[ClipVert<V>]) -> Self::Clip
Maps the indexes of the argument to vertices.
Provided Methods§
Sourcefn is_backface(_: &Self::Screen) -> bool
fn is_backface(_: &Self::Screen) -> bool
Returns whether the argument is facing away from the camera.
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.