/// This matrix translates between world-space and camera-space
This matrix translates between world-space and camera-space
This matrix translates between world - space and camera - space
pub fn look_at_matrix(pos: &Vec3, up: &Vec3, look_at: &Vec3) -> Mat4 {
        let dir = (*look_at - *pos).unit();
        let left = (up.unit().cross(&dir)).unit();
        let new_up = dir.cross(&left);
        Mat4::new(
            left.x, new_up.x, dir.x, pos.x,
            left.y, new_up.y, dir.y, pos.y,
            left.z, new_up.z, dir.z, pos.z,
               0.0,      0.0,   0.0,   1.0
        )
    }
pub fn look_at_matrix ( pos : & Vec3 , up : & Vec3 , look_at : & Vec3 ) -> Mat4 { let dir = ( * look_at - * pos ) . unit ( ) ; let left = ( up . unit ( ) . cross ( & dir ) ) . unit ( ) ; let new_up = dir . cross ( & left ) ; Mat4 :: new ( left . x , new_up . x , dir . x , pos . x , left . y , new_up . y , dir . y , pos . y , left . z , new_up . z , dir . z , pos . z , 0.0 , 0.0 , 0.0 , 1.0 ) }
This matrix translates between world-space and camera-space
This matrix translates between world - space and camera - space
pos
&Vec3
up
&Vec3
look_at
&Vec3