pub trait Viewer {
// Required methods
fn position(&self) -> Vec3;
fn view(&self) -> Mat4;
fn projection(&self) -> Mat4;
fn viewport(&self) -> Viewport;
fn z_near(&self) -> f32;
fn z_far(&self) -> f32;
fn color_mapping(&self) -> ColorMapping;
fn tone_mapping(&self) -> ToneMapping;
}
Expand description
Represents a viewer, usually some kind of camera. The default implementation of this trait is the Camera which should be adequate for most use cases.
Required Methods§
Sourcefn projection(&self) -> Mat4
fn projection(&self) -> Mat4
The projection matrix which transforms from view space to clip space (2D position on the screen).
Sourcefn color_mapping(&self) -> ColorMapping
fn color_mapping(&self) -> ColorMapping
Defines the ColorMapping applied to the final rendered image.
Sourcefn tone_mapping(&self) -> ToneMapping
fn tone_mapping(&self) -> ToneMapping
Defines the ToneMapping applied to the final rendered image.