Function gl_utils::camera2d::transform_mat_world_to_view[][src]

pub fn transform_mat_world_to_view(
    view_position: &Point2<f32>,
    view_orientation: &Basis2<f32>
) -> Matrix4<f32>

Builds a 4x4 transformation matrix that will transform points in world space coordinates to view space coordinates based on the current 2D view position and orientation.

The Z coordinate of the position is always 0.0 and the view is always looking down the negative Z axis.