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

#include <matrix4.h>

Public Member Functions

 Matrix4 (void)
 
 Matrix4 (const Matrix4 &m)
 
 Matrix4 (bool identity)
 
 Matrix4 (const Matrix3D &m)
 
 Matrix4 (const Matrix3 &m)
 
 Matrix4 (const Vector4 &v0, const Vector4 &v1, const Vector4 &v2, const Vector4 &v3)
 
void Make_Identity (void)
 
void Init (const Matrix3D &m)
 
void Init (const Matrix3 &m)
 
void Init (const Vector4 &v0, const Vector4 &v1, const Vector4 &v2, const Vector4 &v3)
 
void Init_Ortho (float left, float right, float bottom, float top, float znear, float zfar)
 
void Init_Perspective (float hfov, float vfov, float znear, float zfar)
 
void Init_Perspective (float left, float right, float bottom, float top, float znear, float zfar)
 
Vector4operator[] (int i)
 
const Vector4operator[] (int i) const
 
Matrix4 Transpose (void) const
 
Matrix4 Inverse (void) const
 
Matrix4operator= (const Matrix4 &m)
 
Matrix4operator+= (const Matrix4 &m)
 
Matrix4operator-= (const Matrix4 &m)
 
Matrix4operator*= (float d)
 
Matrix4operator/= (float d)
 

Static Public Member Functions

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

Protected Attributes

Vector4 Row [4]
 

Friends

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

Detailed Description

Definition at line 69 of file matrix4.h.

Constructor & Destructor Documentation

◆ Matrix4() [1/6]

Matrix4::Matrix4 ( void )
inline

Definition at line 76 of file matrix4.h.

◆ Matrix4() [2/6]

Matrix4::Matrix4 ( const Matrix4 & m)
inline

Definition at line 208 of file matrix4.h.

◆ Matrix4() [3/6]

Matrix4::Matrix4 ( bool identity)
inlineexplicit

Definition at line 189 of file matrix4.h.

◆ Matrix4() [4/6]

Matrix4::Matrix4 ( const Matrix3D & m)
inlineexplicit

Definition at line 225 of file matrix4.h.

◆ Matrix4() [5/6]

Matrix4::Matrix4 ( const Matrix3 & m)
explicit

◆ Matrix4() [6/6]

Matrix4::Matrix4 ( const Vector4 & v0,
const Vector4 & v1,
const Vector4 & v2,
const Vector4 & v3 )
inlineexplicit

Definition at line 242 of file matrix4.h.

Member Function Documentation

◆ Init() [1/3]

void Matrix4::Init ( const Matrix3 & m)

◆ Init() [2/3]

void Matrix4::Init ( const Matrix3D & m)
inline

Definition at line 281 of file matrix4.h.

◆ Init() [3/3]

void Matrix4::Init ( const Vector4 & v0,
const Vector4 & v1,
const Vector4 & v2,
const Vector4 & v3 )
inline

Definition at line 299 of file matrix4.h.

◆ Init_Ortho()

void Matrix4::Init_Ortho ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inline

Definition at line 328 of file matrix4.h.

◆ Init_Perspective() [1/2]

void Matrix4::Init_Perspective ( float hfov,
float vfov,
float znear,
float zfar )
inline

Definition at line 374 of file matrix4.h.

◆ Init_Perspective() [2/2]

void Matrix4::Init_Perspective ( float left,
float right,
float bottom,
float top,
float znear,
float zfar )
inline

Definition at line 408 of file matrix4.h.

◆ Inverse()

Matrix4 Matrix4::Inverse ( void ) const
inline

Definition at line 466 of file matrix4.h.

◆ Make_Identity()

void Matrix4::Make_Identity ( void )
inline

Definition at line 260 of file matrix4.h.

◆ Multiply() [1/3]

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

Definition at line 101 of file matrix4.cpp.

◆ Multiply() [2/3]

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

Definition at line 142 of file matrix4.cpp.

◆ Multiply() [3/3]

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

Definition at line 58 of file matrix4.cpp.

◆ operator*=()

Matrix4 & Matrix4::operator*= ( float d)
inline

Definition at line 571 of file matrix4.h.

◆ operator+=()

Matrix4 & Matrix4::operator+= ( const Matrix4 & m)
inline

Definition at line 535 of file matrix4.h.

◆ operator-=()

Matrix4 & Matrix4::operator-= ( const Matrix4 & m)
inline

Definition at line 553 of file matrix4.h.

◆ operator/=()

Matrix4 & Matrix4::operator/= ( float d)
inline

Definition at line 589 of file matrix4.h.

◆ operator=()

Matrix4 & Matrix4::operator= ( const Matrix4 & m)
inline

Definition at line 517 of file matrix4.h.

◆ operator[]() [1/2]

Vector4 & Matrix4::operator[] ( int i)
inline

Definition at line 96 of file matrix4.h.

◆ operator[]() [2/2]

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

Definition at line 97 of file matrix4.h.

◆ Transform_Vector()

void Matrix4::Transform_Vector ( const Matrix4 & tm,
const Vector3 & in,
Vector3 * out )
inlinestatic

Definition at line 698 of file matrix4.h.

◆ Transpose()

Matrix4 Matrix4::Transpose ( void ) const
inline

Definition at line 444 of file matrix4.h.

Friends And Related Symbol Documentation

◆ Add

Matrix4 Add ( const Matrix4 & a)
friend

◆ Multiply

Matrix4 Multiply ( const Matrix4 & a,
const Matrix4 & b )
friend

Definition at line 666 of file matrix4.h.

◆ operator!=

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

◆ operator* [1/5]

Matrix4 operator* ( const Matrix4 & a,
const Matrix4 & b )
friend

Definition at line 652 of file matrix4.h.

◆ operator* [2/5]

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

Definition at line 674 of file matrix4.h.

◆ operator* [3/5]

Vector4 operator* ( const Matrix4 & a,
const Vector4 & v )
friend

Definition at line 686 of file matrix4.h.

◆ operator* [4/5]

Matrix4 operator* ( const Matrix4 & a,
float d )
friend

Definition at line 601 of file matrix4.h.

◆ operator* [5/5]

Matrix4 operator* ( float d,
const Matrix4 & a )
friend

Definition at line 606 of file matrix4.h.

◆ operator+

Matrix4 operator+ ( const Matrix4 & a,
const Matrix4 & b )
friend

Definition at line 620 of file matrix4.h.

◆ operator- [1/2]

Matrix4 operator- ( const Matrix4 & a)
friend

Definition at line 596 of file matrix4.h.

◆ operator- [2/2]

Matrix4 operator- ( const Matrix4 & a,
const Matrix4 & b )
friend

Definition at line 636 of file matrix4.h.

◆ operator/

Matrix4 operator/ ( const Matrix4 & a,
float d )
friend

Definition at line 611 of file matrix4.h.

◆ operator==

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

◆ Subtract

Matrix4 Subtract ( const Matrix4 & a,
const Matrix4 & b )
friend

Definition at line 646 of file matrix4.h.

◆ Swap

void Swap ( Matrix4 & a,
Matrix4 & b )
friend

Member Data Documentation

◆ Row

Vector4 Matrix4::Row[4]
protected

Definition at line 172 of file matrix4.h.


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