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§
Sourcefn project_dir(&self, dir_c: &Vector3<S>) -> Option<Point2<S>>
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).
Sourcefn unproject_dir(&self, n: &Point2<S>) -> Vector3<S>
fn unproject_dir(&self, n: &Point2<S>) -> Vector3<S>
Unproject normalized coordinates to a direction in camera coordinates.