Gizmo3D

gzMatrix.h File Reference

Matrix and Vector management utilites. More...

#include "gzBasicTypes.h"
#include "gzBase.h"
#include <math.h>

Go to the source code of this file.

Classes

class  gzVec2
class  gzVec3
class  gzVec4
class  gzMatrix2
class  gzMatrix3
class  gzMatrix4

Defines

#define gzSqrt(x)   sqrt(x)

Enumerations

enum  GZ_MATRIX3_IND {
  GZ3_V11, GZ3_V21, GZ3_V31, GZ3_V12,
  GZ3_V22, GZ3_V32, GZ3_V13, GZ3_V23,
  GZ3_V33
}
enum  GZ_MATRIX4_IND {
  GZ4_V11, GZ4_V21, GZ4_V31, GZ4_V41,
  GZ4_V12, GZ4_V22, GZ4_V32, GZ4_V42,
  GZ4_V13, GZ4_V23, GZ4_V33, GZ4_V43,
  GZ4_V14, GZ4_V24, GZ4_V34, GZ4_V44
}

Functions

gzVec2 operator * (const gzReal &val, const gzVec2 &vector)
gzVec3 operator * (const gzReal &val, const gzVec3 &vector)
gzMatrix4 operator * (const gzMatrix4 &mat1, const gzMatrix4 &mat2)
gzMatrix4 operator+ (const gzMatrix4 &mat1, const gzMatrix4 &mat2)
gzMatrix4 operator- (const gzMatrix4 &mat1, const gzMatrix4 &mat2)
gzMatrix4 operator * (const gzMatrix4 &mat1, const gzReal &value)
gzMatrix4 operator/ (const gzMatrix4 &mat1, const gzReal &value)
gzVec4 operator * (const gzMatrix4 &mat, const gzVec4 &vec)
gzVec4 operator * (const gzVec4 &vec, const gzMatrix4 &mat)
gzVec3 multiply (const gzMatrix4 &mat, const gzVec3 &vec)
 default w=1, cast to gzVec3
gzVec3 multiply (const gzMatrix4 &mat, const gzVec3 &vec, const gzReal &w)
 default w=1, cast to gzVec3
gzVec3 normweight (const gzMatrix4 &mat, const gzVec3 &vec, const gzReal &w=GZ_REAL_ONE)
 default w=1, cast to gzVec3
gzVec4 operator * (const gzMatrix4 &mat, const gzVec3 &vec)
 default w=1
gzVec3 operator * (const gzMatrix3 &mat, const gzVec3 &vec)
const gzMatrix4gzGetUnitMatrix () GZ_NO_THROW
 Returns a unit gzMatrix4 instance.
gzVoid gzGetTranslationMatrix (gzMatrix4 &matrix, gzReal dx, gzReal dy, gzReal dz) GZ_NO_THROW
gzVoid gzGetTranslationMatrix (gzMatrix4 &matrix, const gzVec3 &translation) GZ_NO_THROW
gzVoid gzGetScaleMatrix (gzMatrix4 &matrix, gzReal dx, gzReal dy, gzReal dz) GZ_NO_THROW
gzVoid gzGetScaleMatrix (gzMatrix4 &matrix, const gzVec3 &scale) GZ_NO_THROW
gzVoid gzGetBaseMatrix (gzMatrix4 &matrix, const gzVec3 &base) GZ_NO_THROW
gzVoid gzGetBaseMatrix (gzMatrix4 &matrix, const gzVec3 &x_base, const gzVec3 &y_base) GZ_NO_THROW
gzVoid gzGetRotationMatrix (gzMatrix4 &matrix, const gzVec3 &base, gzReal angle) GZ_NO_THROW
gzVoid gzGetRotationMatrix (gzMatrix4 &matrix, gzReal heading, gzReal pitch, gzReal roll) GZ_NO_THROW
gzVoid gzGetRotationMatrix (gzMatrix4 &matrix, const gzVec3 &orientation) GZ_NO_THROW
gzVoid gzGetBiasMatrix (gzMatrix4 &matrix, gzReal x_factor=1.0f, gzReal x_offset=0.0f, gzReal y_factor=1.0f, gzReal y_offset=0.0f, gzReal z_factor=1.0f, gzReal z_offset=0.0f)
gzBool gzIsPureTranslation (const gzMatrix4 &matrix, gzVec3 &translation)
gzReal gzGetNormDot (const gzVec3 &a, const gzVec3 &b, const gzVec3 &c, const gzVec3 &dir) GZ_NO_THROW
gzVoid getExtendedVector (gzVec3 &dest, const gzVec3 &from, const gzVec3 &to, const gzReal &magnitude) GZ_NO_THROW

Variables

const gzVec2 GZ_ZERO_VEC2 = gzVec2(0,0)
const gzVec3 GZ_ZERO_VEC3 = gzVec3(0,0,0)
const gzVec4 GZ_ZERO_VEC4 = gzVec4(0,0,0,0)
const gzVec2 GZ_ONE_VEC2 = gzVec2(1,1)
const gzVec3 GZ_ONE_VEC3 = gzVec3(1,1,1)
const gzVec4 GZ_ONE_VEC4 = gzVec4(1,1,1,1)
const gzVec3 GZ_X_VEC3 = gzVec3(1,0,0)
const gzVec3 GZ_Y_VEC3 = gzVec3(0,1,0)
const gzVec3 GZ_Z_VEC3 = gzVec3(0,0,1)
const gzVec4 GZ_X_VEC4 = gzVec4(1,0,0,0)
const gzVec4 GZ_Y_VEC4 = gzVec4(0,1,0,0)
const gzVec4 GZ_Z_VEC4 = gzVec4(0,0,1,0)
const gzVec4 GZ_W_VEC4 = gzVec4(0,0,0,1)


Detailed Description

Matrix and Vector management utilites.

Most basic vector and matrix operations can be found in this class. The implementation checks the system for accellerated features like MMX,SIMD or 3DNow etc. to enhance performance

Definition in file gzMatrix.h.


Define Documentation

#define gzSqrt  )     sqrt(x)
 

Definition at line 37 of file gzMatrix.h.


Enumeration Type Documentation

enum GZ_MATRIX3_IND
 

Enumerator:
GZ3_V11 
GZ3_V21 
GZ3_V31 
GZ3_V12 
GZ3_V22 
GZ3_V32 
GZ3_V13 
GZ3_V23 
GZ3_V33 

Definition at line 526 of file gzMatrix.h.

enum GZ_MATRIX4_IND
 

Enumerator:
GZ4_V11 
GZ4_V21 
GZ4_V31 
GZ4_V41 
GZ4_V12 
GZ4_V22 
GZ4_V32 
GZ4_V42 
GZ4_V13 
GZ4_V23 
GZ4_V33 
GZ4_V43 
GZ4_V14 
GZ4_V24 
GZ4_V34 
GZ4_V44 

Definition at line 527 of file gzMatrix.h.


Function Documentation

gzVoid getExtendedVector gzVec3 dest,
const gzVec3 from,
const gzVec3 to,
const gzReal magnitude
[inline]
 

Definition at line 685 of file gzMatrix.h.

gzVoid gzGetBaseMatrix gzMatrix4 matrix,
const gzVec3 x_base,
const gzVec3 y_base
 

gzVoid gzGetBaseMatrix gzMatrix4 matrix,
const gzVec3 base
 

gzVoid gzGetBiasMatrix gzMatrix4 matrix,
gzReal  x_factor = 1.0f,
gzReal  x_offset = 0.0f,
gzReal  y_factor = 1.0f,
gzReal  y_offset = 0.0f,
gzReal  z_factor = 1.0f,
gzReal  z_offset = 0.0f
 

gzReal gzGetNormDot const gzVec3 a,
const gzVec3 b,
const gzVec3 c,
const gzVec3 dir
[inline]
 

Definition at line 670 of file gzMatrix.h.

gzVoid gzGetRotationMatrix gzMatrix4 matrix,
const gzVec3 orientation
 

gzVoid gzGetRotationMatrix gzMatrix4 matrix,
gzReal  heading,
gzReal  pitch,
gzReal  roll
 

gzVoid gzGetRotationMatrix gzMatrix4 matrix,
const gzVec3 base,
gzReal  angle
 

gzVoid gzGetScaleMatrix gzMatrix4 matrix,
const gzVec3 scale
 

gzVoid gzGetScaleMatrix gzMatrix4 matrix,
gzReal  dx,
gzReal  dy,
gzReal  dz
 

gzVoid gzGetTranslationMatrix gzMatrix4 matrix,
const gzVec3 translation
 

gzVoid gzGetTranslationMatrix gzMatrix4 matrix,
gzReal  dx,
gzReal  dy,
gzReal  dz
 

const gzMatrix4& gzGetUnitMatrix  ) 
 

Returns a unit gzMatrix4 instance.

gzBool gzIsPureTranslation const gzMatrix4 matrix,
gzVec3 translation
 

gzVec3 multiply const gzMatrix4 mat,
const gzVec3 vec,
const gzReal w
 

default w=1, cast to gzVec3

gzVec3 multiply const gzMatrix4 mat,
const gzVec3 vec
 

default w=1, cast to gzVec3

gzVec3 normweight const gzMatrix4 mat,
const gzVec3 vec,
const gzReal w = GZ_REAL_ONE
 

default w=1, cast to gzVec3

gzVec3 operator * const gzMatrix3 mat,
const gzVec3 vec
 

gzVec4 operator * const gzMatrix4 mat,
const gzVec3 vec
 

default w=1

gzVec4 operator * const gzVec4 vec,
const gzMatrix4 mat
 

gzVec4 operator * const gzMatrix4 mat,
const gzVec4 vec
 

gzMatrix4 operator * const gzMatrix4 mat1,
const gzReal value
 

gzMatrix4 operator * const gzMatrix4 mat1,
const gzMatrix4 mat2
 

gzVec3 operator * const gzReal val,
const gzVec3 vector
[inline]
 

Definition at line 346 of file gzMatrix.h.

References gzVec3::v1, gzVec3::v2, and gzVec3::v3.

gzVec2 operator * const gzReal val,
const gzVec2 vector
[inline]
 

Definition at line 176 of file gzMatrix.h.

References gzVec2::v1, and gzVec2::v2.

gzMatrix4 operator+ const gzMatrix4 mat1,
const gzMatrix4 mat2
 

gzMatrix4 operator- const gzMatrix4 mat1,
const gzMatrix4 mat2
 

gzMatrix4 operator/ const gzMatrix4 mat1,
const gzReal value
 


Variable Documentation

const gzVec2 GZ_ONE_VEC2 = gzVec2(1,1)
 

Definition at line 533 of file gzMatrix.h.

const gzVec3 GZ_ONE_VEC3 = gzVec3(1,1,1)
 

Definition at line 534 of file gzMatrix.h.

const gzVec4 GZ_ONE_VEC4 = gzVec4(1,1,1,1)
 

Definition at line 535 of file gzMatrix.h.

const gzVec4 GZ_W_VEC4 = gzVec4(0,0,0,1)
 

Definition at line 544 of file gzMatrix.h.

const gzVec3 GZ_X_VEC3 = gzVec3(1,0,0)
 

Definition at line 537 of file gzMatrix.h.

const gzVec4 GZ_X_VEC4 = gzVec4(1,0,0,0)
 

Definition at line 541 of file gzMatrix.h.

const gzVec3 GZ_Y_VEC3 = gzVec3(0,1,0)
 

Definition at line 538 of file gzMatrix.h.

const gzVec4 GZ_Y_VEC4 = gzVec4(0,1,0,0)
 

Definition at line 542 of file gzMatrix.h.

const gzVec3 GZ_Z_VEC3 = gzVec3(0,0,1)
 

Definition at line 539 of file gzMatrix.h.

const gzVec4 GZ_Z_VEC4 = gzVec4(0,0,1,0)
 

Definition at line 543 of file gzMatrix.h.

const gzVec2 GZ_ZERO_VEC2 = gzVec2(0,0)
 

Definition at line 529 of file gzMatrix.h.

const gzVec3 GZ_ZERO_VEC3 = gzVec3(0,0,0)
 

Definition at line 530 of file gzMatrix.h.

const gzVec4 GZ_ZERO_VEC4 = gzVec4(0,0,0,0)
 

Definition at line 531 of file gzMatrix.h.


Documentation for Gizmo3D generated at Wed Feb 20 11:54:13 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond