Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Matrix4x4 Class Reference

#include <matrix4.h>

Public Member Functions

 Matrix4x4 (void)
 
 Matrix4x4 (const Matrix4x4 &m)
 
WWINLINE Matrix4x4 (bool identity)
 
WWINLINE Matrix4x4 (const Matrix3D &m)
 
WWINLINE Matrix4x4 (const Matrix3x3 &m)
 
WWINLINE Matrix4x4 (const Vector4 &v0, const Vector4 &v1, const Vector4 &v2, const Vector4 &v3)
 
WWINLINE Matrix4x4 (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
 
WWINLINE void Make_Identity (void)
 
WWINLINE void Init (const Matrix3D &m)
 
WWINLINE void Init (const Matrix3x3 &m)
 
WWINLINE void Init (const Vector4 &v0, const Vector4 &v1, const Vector4 &v2, const Vector4 &v3)
 
WWINLINE void Init (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
 
WWINLINE void Init_Ortho (float left, float right, float bottom, float top, float znear, float zfar)
 
WWINLINE void Init_Perspective (float hfov, float vfov, float znear, float zfar)
 
WWINLINE void Init_Perspective (float left, float right, float bottom, float top, float znear, float zfar)
 
WWINLINE Vector4operator[] (int i)
 
WWINLINE const Vector4operator[] (int i) const
 
WWINLINE Matrix4x4 Transpose (void) const
 
WWINLINE Matrix4x4 Inverse (void) const
 
WWINLINE Matrix4x4operator= (const Matrix4x4 &m)
 
WWINLINE Matrix4x4operator+= (const Matrix4x4 &m)
 
WWINLINE Matrix4x4operator-= (const Matrix4x4 &m)
 
WWINLINE Matrix4x4operator*= (float d)
 
WWINLINE Matrix4x4operator/= (float d)
 

Static Public Member Functions

static void Multiply (const Matrix4x4 &A, const Matrix4x4 &B, Matrix4x4 *set_result)
 
static void Multiply (const Matrix3D &A, const Matrix4x4 &B, Matrix4x4 *set_result)
 
static void Multiply (const Matrix4x4 &A, const Matrix3D &B, Matrix4x4 *set_result)
 
static WWINLINE void Transform_Vector (const Matrix4x4 &tm, const Vector3 &in, Vector3 *out)
 
static WWINLINE void Transform_Vector (const Matrix4x4 &tm, const Vector3 &in, Vector4 *out)
 
static WWINLINE void Transform_Vector (const Matrix4x4 &tm, const Vector4 &in, Vector4 *out)
 

Protected Attributes

Vector4 Row [4]
 

Friends

WWINLINE friend Matrix4x4 operator- (const Matrix4x4 &a)
 
WWINLINE friend Matrix4x4 operator* (const Matrix4x4 &a, float d)
 
WWINLINE friend Matrix4x4 operator* (float d, const Matrix4x4 &a)
 
WWINLINE friend Matrix4x4 operator/ (const Matrix4x4 &a, float d)
 
WWINLINE friend Matrix4x4 operator+ (const Matrix4x4 &a, const Matrix4x4 &b)
 
WWINLINE friend Matrix4x4 Add (const Matrix4x4 &a)
 
WWINLINE friend Matrix4x4 operator- (const Matrix4x4 &a, const Matrix4x4 &b)
 
WWINLINE friend Matrix4x4 Subtract (const Matrix4x4 &a, const Matrix4x4 &b)
 
WWINLINE friend Matrix4x4 operator* (const Matrix4x4 &a, const Matrix4x4 &b)
 
WWINLINE friend Matrix4x4 Multiply (const Matrix4x4 &a, const Matrix4x4 &b)
 
WWINLINE friend Matrix4x4 operator* (const Matrix4x4 &a, const Matrix3D &b)
 
WWINLINE friend Matrix4x4 operator* (const Matrix3D &a, const Matrix4x4 &b)
 
int operator== (const Matrix4x4 &a, const Matrix4x4 &b)
 
int operator!= (const Matrix4x4 &a, const Matrix4x4 &b)
 
WWINLINE friend void Swap (Matrix4x4 &a, Matrix4x4 &b)
 
WWINLINE friend Vector4 operator* (const Matrix4x4 &a, const Vector4 &v)
 
WWINLINE friend Vector4 operator* (const Matrix4x4 &a, const Vector3 &v)
 

Detailed Description

Definition at line 74 of file matrix4.h.

Constructor & Destructor Documentation

◆ Matrix4x4() [1/7]

Matrix4x4::Matrix4x4 ( void )
inline

Definition at line 81 of file matrix4.h.

◆ Matrix4x4() [2/7]

WWINLINE Matrix4x4::Matrix4x4 ( const Matrix4x4 & m)

Definition at line 229 of file matrix4.h.

◆ Matrix4x4() [3/7]

WWINLINE Matrix4x4::Matrix4x4 ( bool identity)
explicit

Definition at line 210 of file matrix4.h.

◆ Matrix4x4() [4/7]

WWINLINE Matrix4x4::Matrix4x4 ( const Matrix3D & m)
explicit

Definition at line 246 of file matrix4.h.

◆ Matrix4x4() [5/7]

WWINLINE Matrix4x4::Matrix4x4 ( const Matrix3x3 & m)
explicit

◆ Matrix4x4() [6/7]

WWINLINE Matrix4x4::Matrix4x4 ( const Vector4 & v0,
const Vector4 & v1,
const Vector4 & v2,
const Vector4 & v3 )
explicit

Definition at line 263 of file matrix4.h.

◆ Matrix4x4() [7/7]

WWINLINE Matrix4x4::Matrix4x4 ( float m11,
float m12,
float m13,
float m14,
float m21,
float m22,
float m23,
float m24,
float m31,
float m32,
float m33,
float m34,
float m41,
float m42,
float m43,
float m44 )
explicit

Definition at line 280 of file matrix4.h.

Member Function Documentation

◆ Init() [1/4]

WWINLINE void Matrix4x4::Init ( const Matrix3D & m)

Definition at line 319 of file matrix4.h.

◆ Init() [2/4]

WWINLINE void Matrix4x4::Init ( const Matrix3x3 & m)

◆ Init() [3/4]

WWINLINE void Matrix4x4::Init ( const Vector4 & v0,
const Vector4 & v1,
const Vector4 & v2,
const Vector4 & v3 )

Definition at line 337 of file matrix4.h.

◆ Init() [4/4]

WWINLINE void Matrix4x4::Init ( float m11,
float m12,
float m13,
float m14,
float m21,
float m22,
float m23,
float m24,
float m31,
float m32,
float m33,
float m34,
float m41,
float m42,
float m43,
float m44 )

Definition at line 355 of file matrix4.h.

◆ Init_Ortho()

WWINLINE void Matrix4x4::Init_Ortho ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )

Definition at line 388 of file matrix4.h.

◆ Init_Perspective() [1/2]

WWINLINE void Matrix4x4::Init_Perspective ( float hfov,
float vfov,
float znear,
float zfar )

Definition at line 438 of file matrix4.h.

◆ Init_Perspective() [2/2]

WWINLINE void Matrix4x4::Init_Perspective ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )

Definition at line 483 of file matrix4.h.

◆ Inverse()

WWINLINE Matrix4x4 Matrix4x4::Inverse ( void ) const

Definition at line 541 of file matrix4.h.

◆ Make_Identity()

WWINLINE void Matrix4x4::Make_Identity ( void )

Definition at line 298 of file matrix4.h.

◆ Multiply() [1/3]

void Matrix4x4::Multiply ( const Matrix3D & A,
const Matrix4x4 & B,
Matrix4x4 * set_result )
static

Definition at line 104 of file matrix4.cpp.

◆ Multiply() [2/3]

void Matrix4x4::Multiply ( const Matrix4x4 & A,
const Matrix3D & B,
Matrix4x4 * set_result )
static

Definition at line 145 of file matrix4.cpp.

◆ Multiply() [3/3]

void Matrix4x4::Multiply ( const Matrix4x4 & A,
const Matrix4x4 & B,
Matrix4x4 * set_result )
static

Definition at line 61 of file matrix4.cpp.

◆ operator*=()

WWINLINE Matrix4x4 & Matrix4x4::operator*= ( float d)

Definition at line 648 of file matrix4.h.

◆ operator+=()

WWINLINE Matrix4x4 & Matrix4x4::operator+= ( const Matrix4x4 & m)

Definition at line 612 of file matrix4.h.

◆ operator-=()

WWINLINE Matrix4x4 & Matrix4x4::operator-= ( const Matrix4x4 & m)

Definition at line 630 of file matrix4.h.

◆ operator/=()

WWINLINE Matrix4x4 & Matrix4x4::operator/= ( float d)

Definition at line 666 of file matrix4.h.

◆ operator=()

WWINLINE Matrix4x4 & Matrix4x4::operator= ( const Matrix4x4 & m)

Definition at line 594 of file matrix4.h.

◆ operator[]() [1/2]

WWINLINE Vector4 & Matrix4x4::operator[] ( int i)
inline

Definition at line 113 of file matrix4.h.

◆ operator[]() [2/2]

WWINLINE const Vector4 & Matrix4x4::operator[] ( int i) const
inline

Definition at line 114 of file matrix4.h.

◆ Transform_Vector() [1/3]

WWINLINE void Matrix4x4::Transform_Vector ( const Matrix4x4 & tm,
const Vector3 & in,
Vector3 * out )
static

Definition at line 801 of file matrix4.h.

◆ Transform_Vector() [2/3]

WWINLINE void Matrix4x4::Transform_Vector ( const Matrix4x4 & tm,
const Vector3 & in,
Vector4 * out )
static

Definition at line 820 of file matrix4.h.

◆ Transform_Vector() [3/3]

WWINLINE void Matrix4x4::Transform_Vector ( const Matrix4x4 & tm,
const Vector4 & in,
Vector4 * out )
static

Definition at line 828 of file matrix4.h.

◆ Transpose()

WWINLINE Matrix4x4 Matrix4x4::Transpose ( void ) const

Definition at line 519 of file matrix4.h.

Friends And Related Symbol Documentation

◆ Add

WWINLINE friend Matrix4x4 Add ( const Matrix4x4 & a)
friend

◆ Multiply

WWINLINE friend Matrix4x4 Multiply ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 743 of file matrix4.h.

◆ operator!=

int operator!= ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 193 of file matrix4.cpp.

◆ operator* [1/7]

WWINLINE friend Matrix4x4 operator* ( const Matrix3D & a,
const Matrix4x4 & b )
friend

Definition at line 761 of file matrix4.h.

◆ operator* [2/7]

WWINLINE friend Matrix4x4 operator* ( const Matrix4x4 & a,
const Matrix3D & b )
friend

Definition at line 746 of file matrix4.h.

◆ operator* [3/7]

WWINLINE friend Matrix4x4 operator* ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 729 of file matrix4.h.

◆ operator* [4/7]

WWINLINE friend Vector4 operator* ( const Matrix4x4 & a,
const Vector3 & v )
friend

Definition at line 777 of file matrix4.h.

◆ operator* [5/7]

WWINLINE friend Vector4 operator* ( const Matrix4x4 & a,
const Vector4 & v )
friend

Definition at line 789 of file matrix4.h.

◆ operator* [6/7]

WWINLINE friend Matrix4x4 operator* ( const Matrix4x4 & a,
float d )
friend

Definition at line 678 of file matrix4.h.

◆ operator* [7/7]

WWINLINE friend Matrix4x4 operator* ( float d,
const Matrix4x4 & a )
friend

Definition at line 683 of file matrix4.h.

◆ operator+

WWINLINE friend Matrix4x4 operator+ ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 697 of file matrix4.h.

◆ operator- [1/2]

WWINLINE friend Matrix4x4 operator- ( const Matrix4x4 & a)
friend

Definition at line 673 of file matrix4.h.

◆ operator- [2/2]

WWINLINE friend Matrix4x4 operator- ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 713 of file matrix4.h.

◆ operator/

WWINLINE friend Matrix4x4 operator/ ( const Matrix4x4 & a,
float d )
friend

Definition at line 688 of file matrix4.h.

◆ operator==

int operator== ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 179 of file matrix4.cpp.

◆ Subtract

WWINLINE friend Matrix4x4 Subtract ( const Matrix4x4 & a,
const Matrix4x4 & b )
friend

Definition at line 723 of file matrix4.h.

◆ Swap

WWINLINE friend void Swap ( Matrix4x4 & a,
Matrix4x4 & b )
friend

Member Data Documentation

◆ Row

Vector4 Matrix4x4::Row[4]
protected

Definition at line 193 of file matrix4.h.


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