MercuryTypes.h File Reference

#include "global.h"
#include "MercuryMath.h"
#include "MercuryMatrix.h"

Go to the source code of this file.

Classes

class  MercuryPoint
 A point in space/vector. More...
class  MQuaternion
 Mathematical Quaternion (Used for Rotation). More...

Functions

MercuryPoint Rotate2DPoint (float fAngle, MercuryPoint pIn)
 Rotate (in 2D) the X and Y components of a MercuryPoint.
void AngleMatrix (const MercuryPoint &angles, MercuryMatrix &mat)
 Produce a matrix out of a rotation x, then y then z (how Mercury does it).
void TranslationMatrix (const MercuryPoint &position, MercuryMatrix &mat)
 Produce a translation matrix, by (x,y,z).
void R_ConcatTransforms3 (MercuryMatrix in1, MercuryMatrix in2, MercuryMatrix &out)
 Concatenate matrices, not using the last row. (faster when applicable, and breaks things that don't expect that last row.).
void VectorIRotate (const MercuryPoint &in1, MercuryMatrix &in2, MercuryPoint &out)
 Legacy vector rotation only functions. It's similar to vector-matrix multiplication.
void VectorRotate (const MercuryPoint &in1, const MercuryMatrix &in2, MercuryPoint &out)
void VectorMultiply (MercuryMatrix &m, const MercuryPoint &p, MercuryPoint &out)
 Vector-Matrix multiplication.
void InvertMatrix (MercuryMatrix &in, MercuryMatrix &out)
 Matrix Inverse of a 4x4 matrix.
float innerProduct (const MQuaternion &a, const MQuaternion &b)
 Returns the Euclidian Inner Product of two Quaternions (Similar to Vector Dot-Product).
MercuryPoint outerProduct (const MQuaternion &a, const MQuaternion &b)
 Returns the Euclidian Outer Product of two Quaternions.
MQuaternion evenProduct (const MQuaternion &a, const MQuaternion &b)
 Returns the Even Product of two Quaternions.
MercuryPoint oddProduct (const MQuaternion &a, const MQuaternion &b)
 Returns the Odd Product of two Quaternions (Similar to Vector Cross-Product).
MQuaternion SLERP (const MQuaternion &a, const MQuaternion &b, float t)
 Spherical Linear Interpolation between two Quaternions at t percent completion(0-1).

Variables

const MercuryPoint gpZero
 Vector of all 0's (0,0,0).
const MercuryPoint gpOne
 Vector of all 1's (1,1,1).
MQuaternion M_ALIGN
 Mathematical Quaternion (Used for Rotation).


Function Documentation

void AngleMatrix ( const MercuryPoint angles,
MercuryMatrix mat 
)

Produce a matrix out of a rotation x, then y then z (how Mercury does it).

Definition at line 104 of file MercuryTypes.cpp.

MQuaternion evenProduct ( const MQuaternion a,
const MQuaternion b 
)

Returns the Even Product of two Quaternions.

float innerProduct ( const MQuaternion a,
const MQuaternion b 
)

Returns the Euclidian Inner Product of two Quaternions (Similar to Vector Dot-Product).

Definition at line 497 of file MercuryTypes.cpp.

void InvertMatrix ( MercuryMatrix in,
MercuryMatrix out 
)

Matrix Inverse of a 4x4 matrix.

Definition at line 227 of file MercuryTypes.cpp.

MercuryPoint oddProduct ( const MQuaternion a,
const MQuaternion b 
)

Returns the Odd Product of two Quaternions (Similar to Vector Cross-Product).

MercuryPoint outerProduct ( const MQuaternion a,
const MQuaternion b 
)

Returns the Euclidian Outer Product of two Quaternions.

void R_ConcatTransforms3 ( MercuryMatrix  in1,
MercuryMatrix  in2,
MercuryMatrix out 
)

Concatenate matrices, not using the last row. (faster when applicable, and breaks things that don't expect that last row.).

Definition at line 138 of file MercuryTypes.cpp.

MercuryPoint Rotate2DPoint ( float  fAngle,
MercuryPoint  pIn 
)

Rotate (in 2D) the X and Y components of a MercuryPoint.

Definition at line 96 of file MercuryTypes.cpp.

MQuaternion SLERP ( const MQuaternion a,
const MQuaternion b,
float  t 
)

Spherical Linear Interpolation between two Quaternions at t percent completion(0-1).

Definition at line 532 of file MercuryTypes.cpp.

void TranslationMatrix ( const MercuryPoint position,
MercuryMatrix mat 
)

Produce a translation matrix, by (x,y,z).

Definition at line 183 of file MercuryTypes.cpp.

void VectorIRotate ( const MercuryPoint in1,
MercuryMatrix in2,
MercuryPoint out 
)

Legacy vector rotation only functions. It's similar to vector-matrix multiplication.

Definition at line 176 of file MercuryTypes.cpp.

void VectorMultiply ( MercuryMatrix m,
const MercuryPoint p,
MercuryPoint out 
)

Vector-Matrix multiplication.

Definition at line 203 of file MercuryTypes.cpp.

void VectorRotate ( const MercuryPoint in1,
const MercuryMatrix in2,
MercuryPoint out 
)

Definition at line 168 of file MercuryTypes.cpp.


Variable Documentation

const MercuryPoint gpOne

Vector of all 1's (1,1,1).

Definition at line 554 of file MercuryTypes.cpp.

const MercuryPoint gpZero

Vector of all 0's (0,0,0).

Definition at line 553 of file MercuryTypes.cpp.

class MQuaternion M_ALIGN

Mathematical Quaternion (Used for Rotation).


Hosted by SourceForge.net Logo