Expand description
Utility for transformation matrix creation
This crate allows the user to create transformation matrices, mostly for the use in OpenGL applications.
§Quick Start
You can start by creating a new
Transform
object, then adding
some transformations, and finalizing the transformation
with the
orthographic()
projection.
use transform_matrix::*;
let t = Transform::new()
.translate(2.0, 0.0, 0.0)
.scale(3.0, 0.0, 0.0)
.orthographic(10.0, 10.0, 1.0);
assert_eq!(t, [
[0.6, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0],
[0.0, 0.0, 0.0, 0.0],
[0.20000005, 1.0, -1.0, 1.0]
]);