Type Definition turbine::math::Mat4
[−]
[src]
type Mat4 = [[f32; 4]; 4];
Matrix type.
Trait Implementations
impl Matrix for Mat4
[src]
fn id() -> Self
[src]
Returns identity matrix.
fn transposed(self) -> Self
[src]
Returns transposed matrix, switching rows and columns.
fn inv(self) -> Self
[src]
Returns inverted matrix.
fn mul(self, rhs: Self) -> Self
[src]
Multiply with another matrix.
fn transform(self, pos: Vec4) -> Vec4
[src]
Transforms a vector in homogenous coordinates.
fn pos(self, pos: Vec3) -> Vec3
[src]
Transform a point.
fn vec(self, vec: Vec3) -> Vec3
[src]
Transform a vector.
fn ray(self, ray: Ray) -> Ray
[src]
Transforms a ray through the matrix.
fn pos_to_frame_buffer(self, pos: Vec3, draw_size: [u32; 2]) -> Vec3
[src]
Transforms a 3D point to frame buffer coordinates. Assumes that the matrix is model-view-projection. Read more