CGVIS Utils
Loading...
Searching...
No Matches
Mat4.h File Reference

4×4 matrix template for 3D transformations, projections, and stereo sets. More...

#include <ostream>
#include <string>
#include <array>
#include <sstream>
#include <cmath>
#include "Vec4.h"
#include "Vec3.h"
Include dependency graph for Mat4.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Mat4t< T >
struct  Mat4t< T >::StereoMatrices
 Bundle of left/right view and projection matrices for stereo. More...

Typedefs

typedef Mat4t< float > Mat4
 Single-precision 4×4 matrix.

Detailed Description

4×4 matrix template for 3D transformations, projections, and stereo sets.

Provides a compact column-major 4×4 matrix type, Mat4t<T>, with arithmetic, vector transforms (Vec2/Vec3/Vec4), common constructors for translation, scaling, and rotations (X/Y/Z and arbitrary axis), as well as transpose, determinant, and inverse. It also offers perspective/orthographic projection builders, a lookAt camera matrix, a mirror matrix, and a helper to compute left/right view–projection matrices for stereo rendering.

Note
Layout: elements are stored in a flat std::array<T,16> named e in column-major order (compatible with OpenGL-style math). The binary operators and factory methods assume this layout.

Typedef Documentation

◆ Mat4

typedef Mat4t<float> Mat4

Single-precision 4×4 matrix.