project3

Function project3 

Source
pub fn project3<T>(
    world: &Matrix4<T>,
    persp: &Matrix4<T>,
    lb: &Vector2<T>,
    rt: &Vector2<T>,
    pt: &Vector3<T>,
) -> Vector3<T>
where T: Scalar,
Expand description

Projects a 3D point to screen coordinates.

§Parameters

  • world: World transformation matrix
  • persp: Perspective projection matrix
  • lb: Screen left-bottom corner
  • rt: Screen right-top corner
  • pt: Point to project

§Returns

Screen coordinates with z in [0,1] (0=near, 1=far)