Trait three_d::Geometry[][src]

pub trait Geometry {
    fn render_depth(
        &self,
        render_states: RenderStates,
        viewport: Viewport,
        camera: &Camera
    ) -> Result<(), Error>;
fn render_depth_to_red(
        &self,
        render_states: RenderStates,
        viewport: Viewport,
        camera: &Camera,
        max_depth: f32
    ) -> Result<(), Error>;
fn aabb(&self) -> Option<AxisAlignedBoundingBox>; }

Required methods

fn render_depth(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera
) -> Result<(), Error>
[src]

Expand description

Render only the depth into the current depth render target which is useful for shadow maps or depth pre-pass. Must be called in a render target render function, for example in the callback function of Screen::write.

fn render_depth_to_red(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera,
    max_depth: f32
) -> Result<(), Error>
[src]

Expand description

Render the depth (scaled such that a value of 1 corresponds to max_depth) into the red channel of the current color render target which for example is used for picking. Must be called in a render target render function, for example in the callback function of Screen::write.

fn aabb(&self) -> Option<AxisAlignedBoundingBox>[src]

Loading content...

Implementors

impl Geometry for InstancedMesh[src]

fn render_depth_to_red(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera,
    max_depth: f32
) -> Result<(), Error>
[src]

fn render_depth(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera
) -> Result<(), Error>
[src]

fn aabb(&self) -> Option<AxisAlignedBoundingBox>[src]

impl Geometry for Mesh[src]

fn render_depth_to_red(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera,
    max_depth: f32
) -> Result<(), Error>
[src]

fn render_depth(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera
) -> Result<(), Error>
[src]

fn aabb(&self) -> Option<AxisAlignedBoundingBox>[src]

impl Geometry for PhongInstancedMesh[src]

fn render_depth_to_red(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera,
    max_depth: f32
) -> Result<(), Error>
[src]

fn render_depth(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera
) -> Result<(), Error>
[src]

fn aabb(&self) -> Option<AxisAlignedBoundingBox>[src]

impl Geometry for PhongMesh[src]

fn render_depth_to_red(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera,
    max_depth: f32
) -> Result<(), Error>
[src]

fn render_depth(
    &self,
    render_states: RenderStates,
    viewport: Viewport,
    camera: &Camera
) -> Result<(), Error>
[src]

fn aabb(&self) -> Option<AxisAlignedBoundingBox>[src]

Loading content...