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

#include <WWmatrix3.h>

Public Member Functions

 Matrix3 (void)
 
 Matrix3 (const Matrix3 &m)
 
 Matrix3 (bool identity)
 
 Matrix3 (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
 
 Matrix3 (const Matrix3D &m)
 
 Matrix3 (const Matrix4 &m)
 
 Matrix3 (float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33)
 
 Matrix3 (const Vector3 &axis, float angle)
 
 Matrix3 (const Vector3 &axis, float s_angle, float c_angle)
 
 Matrix3 (const Quaternion &q)
 
void Set (const Matrix3D &m)
 
void Set (const Matrix4 &m)
 
void Set (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
 
void Set (float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33)
 
void Set (const Vector3 &axis, float angle)
 
void Set (const Vector3 &axis, float s_angle, float c_angle)
 
void Set (const Quaternion &q)
 
Vector3operator[] (int i)
 
const Vector3operator[] (int i) const
 
Matrix3 Transpose (void) const
 
Matrix3 Inverse (void) const
 
float Determinant (void) const
 
Matrix3operator= (const Matrix3 &m)
 
Matrix3operator= (const Matrix3D &m)
 
Matrix3operator= (const Matrix4 &m)
 
Matrix3operator+= (const Matrix3 &m)
 
Matrix3operator-= (const Matrix3 &m)
 
Matrix3operator*= (float d)
 
Matrix3operator/= (float d)
 
void Make_Identity (void)
 
void Rotate_X (float theta)
 
void Rotate_X (float s, float c)
 
void Rotate_Y (float theta)
 
void Rotate_Y (float s, float c)
 
void Rotate_Z (float theta)
 
void Rotate_Z (float s, float c)
 
float Get_X_Rotation (void) const
 
float Get_Y_Rotation (void) const
 
float Get_Z_Rotation (void) const
 
Vector3 Get_X_Vector (void) const
 
Vector3 Get_Y_Vector (void) const
 
Vector3 Get_Z_Vector (void) const
 
void Get_X_Vector (Vector3 *set_x) const
 
void Get_Y_Vector (Vector3 *set_y) const
 
void Get_Z_Vector (Vector3 *set_z) const
 
int Is_Orthogonal (void) const
 
void Re_Orthogonalize (void)
 
void Rotate_AABox_Extent (const Vector3 &extent, Vector3 *new_extent)
 

Static Public Member Functions

static void Add (const Matrix3 &a, const Matrix3 &b, Matrix3 *res)
 
static void Subtract (const Matrix3 &a, const Matrix3 &b, Matrix3 *res)
 
static void Multiply (const Matrix3 &a, const Matrix3 &b, Matrix3 *res)
 
static void Multiply (const Matrix3D &a, const Matrix3 &b, Matrix3 *res)
 
static void Multiply (const Matrix3 &a, const Matrix3D &b, Matrix3 *res)
 
static void Rotate_Vector (const Matrix3 &tm, const Vector3 &in, Vector3 *out)
 
static void Transpose_Rotate_Vector (const Matrix3 &tm, const Vector3 &in, Vector3 *out)
 

Static Public Attributes

static const Matrix3 Identity
 
static const Matrix3 RotateX90
 
static const Matrix3 RotateX180
 
static const Matrix3 RotateX270
 
static const Matrix3 RotateY90
 
static const Matrix3 RotateY180
 
static const Matrix3 RotateY270
 
static const Matrix3 RotateZ90
 
static const Matrix3 RotateZ180
 
static const Matrix3 RotateZ270
 

Protected Attributes

Vector3 Row [3]
 

Friends

Matrix3 operator- (const Matrix3 &a)
 
Matrix3 operator* (const Matrix3 &a, float d)
 
Matrix3 operator* (float d, const Matrix3 &a)
 
Matrix3 operator/ (const Matrix3 &a, float d)
 
Matrix3 operator+ (const Matrix3 &a, const Matrix3 &b)
 
Matrix3 operator- (const Matrix3 &a, const Matrix3 &b)
 
Matrix3 operator* (const Matrix3 &a, const Matrix3 &b)
 
Matrix3 operator* (const Matrix3D &a, const Matrix3 &b)
 
Matrix3 operator* (const Matrix3 &a, const Matrix3D &b)
 
Vector3 operator* (const Matrix3 &a, const Vector3 &v)
 
int operator== (const Matrix3 &a, const Matrix3 &b)
 
int operator!= (const Matrix3 &a, const Matrix3 &b)
 
void Swap (Matrix3 &a, Matrix3 &b)
 

Detailed Description

Definition at line 73 of file WWmatrix3.h.

Constructor & Destructor Documentation

◆ Matrix3() [1/10]

Matrix3::Matrix3 ( void )
inline

Definition at line 80 of file WWmatrix3.h.

◆ Matrix3() [2/10]

Matrix3::Matrix3 ( const Matrix3 & m)
inline

Definition at line 289 of file WWmatrix3.h.

◆ Matrix3() [3/10]

Matrix3::Matrix3 ( bool identity)
inlineexplicit

Definition at line 268 of file WWmatrix3.h.

◆ Matrix3() [4/10]

Matrix3::Matrix3 ( const Vector3 & v0,
const Vector3 & v1,
const Vector3 & v2 )
inlineexplicit

Definition at line 306 of file WWmatrix3.h.

◆ Matrix3() [5/10]

Matrix3::Matrix3 ( const Matrix3D & m)
explicit

Definition at line 131 of file WWmatrix3.cpp.

◆ Matrix3() [6/10]

Matrix3::Matrix3 ( const Matrix4 & m)
explicit

Definition at line 138 of file WWmatrix3.cpp.

◆ Matrix3() [7/10]

Matrix3::Matrix3 ( float m11,
float m12,
float m13,
float m21,
float m22,
float m23,
float m31,
float m32,
float m33 )
inlineexplicit

Definition at line 328 of file WWmatrix3.h.

◆ Matrix3() [8/10]

Matrix3::Matrix3 ( const Vector3 & axis,
float angle )
inlineexplicit

Definition at line 352 of file WWmatrix3.h.

◆ Matrix3() [9/10]

Matrix3::Matrix3 ( const Vector3 & axis,
float s_angle,
float c_angle )
inlineexplicit

Definition at line 357 of file WWmatrix3.h.

◆ Matrix3() [10/10]

Matrix3::Matrix3 ( const Quaternion & q)
inlineexplicit

Definition at line 390 of file WWmatrix3.h.

Member Function Documentation

◆ Add()

void Matrix3::Add ( const Matrix3 & a,
const Matrix3 & b,
Matrix3 * res )
inlinestatic

Definition at line 694 of file WWmatrix3.h.

◆ Determinant()

float Matrix3::Determinant ( void ) const
inline

Definition at line 480 of file WWmatrix3.h.

◆ Get_X_Rotation()

float Matrix3::Get_X_Rotation ( void ) const
inline

Definition at line 589 of file WWmatrix3.h.

◆ Get_X_Vector() [1/2]

void Matrix3::Get_X_Vector ( Vector3 * set_x) const
inline

Definition at line 646 of file WWmatrix3.h.

◆ Get_X_Vector() [2/2]

Vector3 Matrix3::Get_X_Vector ( void ) const
inline

Definition at line 631 of file WWmatrix3.h.

◆ Get_Y_Rotation()

float Matrix3::Get_Y_Rotation ( void ) const
inline

Definition at line 607 of file WWmatrix3.h.

◆ Get_Y_Vector() [1/2]

void Matrix3::Get_Y_Vector ( Vector3 * set_y) const
inline

Definition at line 651 of file WWmatrix3.h.

◆ Get_Y_Vector() [2/2]

Vector3 Matrix3::Get_Y_Vector ( void ) const
inline

Definition at line 636 of file WWmatrix3.h.

◆ Get_Z_Rotation()

float Matrix3::Get_Z_Rotation ( void ) const
inline

Definition at line 625 of file WWmatrix3.h.

◆ Get_Z_Vector() [1/2]

void Matrix3::Get_Z_Vector ( Vector3 * set_z) const
inline

Definition at line 656 of file WWmatrix3.h.

◆ Get_Z_Vector() [2/2]

Vector3 Matrix3::Get_Z_Vector ( void ) const
inline

Definition at line 641 of file WWmatrix3.h.

◆ Inverse()

Matrix3 Matrix3::Inverse ( void ) const
inline

Definition at line 428 of file WWmatrix3.h.

◆ Is_Orthogonal()

int Matrix3::Is_Orthogonal ( void ) const

Definition at line 328 of file WWmatrix3.cpp.

◆ Make_Identity()

void Matrix3::Make_Identity ( void )
inline

Definition at line 320 of file WWmatrix3.h.

◆ Multiply() [1/3]

void Matrix3::Multiply ( const Matrix3 & a,
const Matrix3 & b,
Matrix3 * res )
static

Definition at line 287 of file WWmatrix3.cpp.

◆ Multiply() [2/3]

void Matrix3::Multiply ( const Matrix3 & a,
const Matrix3D & b,
Matrix3 * res )
static

Definition at line 210 of file WWmatrix3.cpp.

◆ Multiply() [3/3]

void Matrix3::Multiply ( const Matrix3D & a,
const Matrix3 & b,
Matrix3 * res )
static

Definition at line 191 of file WWmatrix3.cpp.

◆ operator*=()

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

Definition at line 553 of file WWmatrix3.h.

◆ operator+=()

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

Definition at line 517 of file WWmatrix3.h.

◆ operator-=()

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

Definition at line 535 of file WWmatrix3.h.

◆ operator/=()

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

Definition at line 571 of file WWmatrix3.h.

◆ operator=() [1/3]

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

Definition at line 499 of file WWmatrix3.h.

◆ operator=() [2/3]

Matrix3 & Matrix3::operator= ( const Matrix3D & m)

Definition at line 175 of file WWmatrix3.cpp.

◆ operator=() [3/3]

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

Definition at line 183 of file WWmatrix3.cpp.

◆ operator[]() [1/2]

Vector3 & Matrix3::operator[] ( int i)
inline

Definition at line 114 of file WWmatrix3.h.

◆ operator[]() [2/2]

const Vector3 & Matrix3::operator[] ( int i) const
inline

Definition at line 115 of file WWmatrix3.h.

◆ Re_Orthogonalize()

void Matrix3::Re_Orthogonalize ( void )

Definition at line 345 of file WWmatrix3.cpp.

◆ Rotate_AABox_Extent()

void Matrix3::Rotate_AABox_Extent ( const Vector3 & extent,
Vector3 * new_extent )

Definition at line 391 of file WWmatrix3.cpp.

◆ Rotate_Vector()

void Matrix3::Rotate_Vector ( const Matrix3 & tm,
const Vector3 & in,
Vector3 * out )
inlinestatic

Definition at line 976 of file WWmatrix3.h.

◆ Rotate_X() [1/2]

void Matrix3::Rotate_X ( float s,
float c )
inline

Definition at line 781 of file WWmatrix3.h.

◆ Rotate_X() [2/2]

void Matrix3::Rotate_X ( float theta)
inline

Definition at line 776 of file WWmatrix3.h.

◆ Rotate_Y() [1/2]

void Matrix3::Rotate_Y ( float s,
float c )
inline

Definition at line 815 of file WWmatrix3.h.

◆ Rotate_Y() [2/2]

void Matrix3::Rotate_Y ( float theta)
inline

Definition at line 810 of file WWmatrix3.h.

◆ Rotate_Z() [1/2]

void Matrix3::Rotate_Z ( float s,
float c )
inline

Definition at line 850 of file WWmatrix3.h.

◆ Rotate_Z() [2/2]

void Matrix3::Rotate_Z ( float theta)
inline

Definition at line 845 of file WWmatrix3.h.

◆ Set() [1/7]

void Matrix3::Set ( const Matrix3D & m)

Definition at line 145 of file WWmatrix3.cpp.

◆ Set() [2/7]

void Matrix3::Set ( const Matrix4 & m)

Definition at line 152 of file WWmatrix3.cpp.

◆ Set() [3/7]

void Matrix3::Set ( const Quaternion & q)

Definition at line 159 of file WWmatrix3.cpp.

◆ Set() [4/7]

void Matrix3::Set ( const Vector3 & axis,
float angle )
inline

Definition at line 362 of file WWmatrix3.h.

◆ Set() [5/7]

void Matrix3::Set ( const Vector3 & axis,
float s_angle,
float c_angle )
inline

Definition at line 367 of file WWmatrix3.h.

◆ Set() [6/7]

void Matrix3::Set ( const Vector3 & v0,
const Vector3 & v1,
const Vector3 & v2 )
inline

Definition at line 313 of file WWmatrix3.h.

◆ Set() [7/7]

void Matrix3::Set ( float m11,
float m12,
float m13,
float m21,
float m22,
float m23,
float m31,
float m32,
float m33 )
inline

Definition at line 340 of file WWmatrix3.h.

◆ Subtract()

void Matrix3::Subtract ( const Matrix3 & a,
const Matrix3 & b,
Matrix3 * res )
inlinestatic

Definition at line 714 of file WWmatrix3.h.

◆ Transpose()

Matrix3 Matrix3::Transpose ( void ) const
inline

Definition at line 407 of file WWmatrix3.h.

◆ Transpose_Rotate_Vector()

void Matrix3::Transpose_Rotate_Vector ( const Matrix3 & tm,
const Vector3 & in,
Vector3 * out )
inlinestatic

Definition at line 994 of file WWmatrix3.h.

Friends And Related Symbol Documentation

◆ operator!=

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

Definition at line 758 of file WWmatrix3.h.

◆ operator* [1/6]

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

Definition at line 725 of file WWmatrix3.h.

◆ operator* [2/6]

Matrix3 operator* ( const Matrix3 & a,
const Matrix3D & b )
friend

Definition at line 242 of file WWmatrix3.cpp.

◆ operator* [3/6]

Vector3 operator* ( const Matrix3 & a,
const Vector3 & v )
friend

Definition at line 742 of file WWmatrix3.h.

◆ operator* [4/6]

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

Definition at line 666 of file WWmatrix3.h.

◆ operator* [5/6]

Matrix3 operator* ( const Matrix3D & a,
const Matrix3 & b )
friend

Definition at line 229 of file WWmatrix3.cpp.

◆ operator* [6/6]

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

Definition at line 671 of file WWmatrix3.h.

◆ operator+

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

Definition at line 685 of file WWmatrix3.h.

◆ operator- [1/2]

Matrix3 operator- ( const Matrix3 & a)
friend

Definition at line 661 of file WWmatrix3.h.

◆ operator- [2/2]

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

Definition at line 705 of file WWmatrix3.h.

◆ operator/

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

Definition at line 676 of file WWmatrix3.h.

◆ operator==

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

Definition at line 752 of file WWmatrix3.h.

◆ Swap

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

Member Data Documentation

◆ Identity

const Matrix3 Matrix3::Identity
static

Definition at line 238 of file WWmatrix3.h.

◆ RotateX180

const Matrix3 Matrix3::RotateX180
static

Definition at line 240 of file WWmatrix3.h.

◆ RotateX270

const Matrix3 Matrix3::RotateX270
static

Definition at line 241 of file WWmatrix3.h.

◆ RotateX90

const Matrix3 Matrix3::RotateX90
static

Definition at line 239 of file WWmatrix3.h.

◆ RotateY180

const Matrix3 Matrix3::RotateY180
static

Definition at line 243 of file WWmatrix3.h.

◆ RotateY270

const Matrix3 Matrix3::RotateY270
static

Definition at line 244 of file WWmatrix3.h.

◆ RotateY90

const Matrix3 Matrix3::RotateY90
static

Definition at line 242 of file WWmatrix3.h.

◆ RotateZ180

const Matrix3 Matrix3::RotateZ180
static

Definition at line 246 of file WWmatrix3.h.

◆ RotateZ270

const Matrix3 Matrix3::RotateZ270
static

Definition at line 247 of file WWmatrix3.h.

◆ RotateZ90

const Matrix3 Matrix3::RotateZ90
static

Definition at line 245 of file WWmatrix3.h.

◆ Row

Vector3 Matrix3::Row[3]
protected

Definition at line 251 of file WWmatrix3.h.


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