nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
ncine::Matrix4x4< T > Class Template Reference

A four by four matrix based on templates. More...

#include <Matrix4x4.h>

Collaboration diagram for ncine::Matrix4x4< T >:
Collaboration graph
[legend]

Public Member Functions

 Matrix4x4 (const Vector4< T > &v0, const Vector4< T > &v1, const Vector4< T > &v2, const Vector4< T > &v3)
 
void set (const Vector4< T > &v0, const Vector4< T > &v1, const Vector4< T > &v2, const Vector4< T > &v3)
 
T * data ()
 
const T * data () const
 
Vector4< T > & operator[] (unsigned int index)
 
const Vector4< T > & operator[] (unsigned int index) const
 
bool operator== (const Matrix4x4 &m) const
 
Matrix4x4 operator- () const
 
Matrix4x4operator+= (const Matrix4x4 &m)
 
Matrix4x4operator-= (const Matrix4x4 &m)
 
Matrix4x4operator*= (const Matrix4x4 &m)
 
Matrix4x4operator/= (const Matrix4x4 &m)
 
Matrix4x4operator+= (T s)
 
Matrix4x4operator-= (T s)
 
Matrix4x4operator*= (T s)
 
Matrix4x4operator/= (T s)
 
Vector4< T > operator* (const Vector4< T > &v) const
 
Vector3< T > operator* (const Vector3< T > &v) const
 
Matrix4x4 operator+ (const Matrix4x4 &m) const
 
Matrix4x4 operator- (const Matrix4x4 &m) const
 
Matrix4x4 operator* (const Matrix4x4 &m) const
 
Matrix4x4 operator/ (const Matrix4x4 &m) const
 
Matrix4x4 operator+ (T s) const
 
Matrix4x4 operator- (T s) const
 
Matrix4x4 operator* (T s) const
 
Matrix4x4 operator/ (T s) const
 
Matrix4x4 transposed () const
 
Matrix4x4transpose ()
 
Matrix4x4 inverse () const
 
Matrix4x4translate (T xx, T yy, T zz)
 
Matrix4x4translate (const Vector3< T > &v)
 
Matrix4x4rotateX (T degrees)
 
Matrix4x4rotateY (T degrees)
 
Matrix4x4rotateZ (T degrees)
 
Matrix4x4scale (T xx, T yy, T zz)
 
Matrix4x4scale (const Vector3< T > &v)
 
Matrix4x4scale (T s)
 

Static Public Member Functions

static Matrix4x4 translation (T xx, T yy, T zz)
 
static Matrix4x4 translation (const Vector3< T > &v)
 
static Matrix4x4 rotationX (T degrees)
 
static Matrix4x4 rotationY (T degrees)
 
static Matrix4x4 rotationZ (T degrees)
 
static Matrix4x4 scaling (T xx, T yy, T zz)
 
static Matrix4x4 scaling (const Vector3< T > &v)
 
static Matrix4x4 scaling (T s)
 
static Matrix4x4 ortho (T left, T right, T bottom, T top, T near, T far)
 
static Matrix4x4 frustum (T left, T right, T bottom, T top, T near, T far)
 
static Matrix4x4 perspective (T fovY, T aspect, T near, T far)
 

Static Public Attributes

static const Matrix4x4 Zero
 A matrix with all zero elements.
 
static const Matrix4x4 Identity
 An identity matrix.
 

Friends

template<class S >
Vector4< S > operator* (const Vector4< S > &v, const Matrix4x4< S > &m)
 
template<class S >
Vector3< S > operator* (const Vector3< S > &v, const Matrix4x4< S > &m)
 
template<class S >
Matrix4x4< S > operator* (S s, const Matrix4x4< S > &m)
 

Detailed Description

template<class T>
class ncine::Matrix4x4< T >

A four by four matrix based on templates.


The documentation for this class was generated from the following file: