Skip to main content

ProjectionModel

Trait ProjectionModel 

Source
pub trait ProjectionModel<S: RealField + Copy> {
    // Required methods
    fn project_dir(&self, dir_c: &Vector3<S>) -> Option<Point2<S>>;
    fn unproject_dir(&self, n: &Point2<S>) -> Vector3<S>;
}
Expand description

Projection model from a camera direction to normalized coordinates.

Required Methods§

Source

fn project_dir(&self, dir_c: &Vector3<S>) -> Option<Point2<S>>

Project a direction in camera coordinates to normalized coordinates.

Returns None when the direction is not projectable (e.g. behind camera).

Source

fn unproject_dir(&self, n: &Point2<S>) -> Vector3<S>

Unproject normalized coordinates to a direction in camera coordinates.

Implementors§