MercuryTypes.cpp File Reference

#include <cmath>
#include <string.h>
#include "MercuryTypes.h"
#include "MercuryMath.h"
#include "MercuryUtil.h"

Go to the source code of this file.

Functions

MercuryPoint Rotate2DPoint (float fAngle, MercuryPoint pIn)
 Rotate (in 2D) the X and Y components of a MercuryPoint.
void AngleMatrix (const MercuryPoint &angles, MercuryMatrix &matrix)
 Produce a matrix out of a rotation x, then y then z (how Mercury does it).
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 VectorRotate (const MercuryPoint &in1, const MercuryMatrix &in2, MercuryPoint &out)
void VectorIRotate (const MercuryPoint &in1, MercuryMatrix &in2, MercuryPoint &out)
 Legacy vector rotation only functions. It's similar to vector-matrix multiplication.
void TranslationMatrix (const MercuryPoint &position, MercuryMatrix &mat)
 Produce a translation matrix, by (x,y,z).
void VectorMultiply (MercuryMatrix &m, const MercuryPoint &p, MercuryPoint &out)
 Vector-Matrix multiplication.
void ScaleSector (MercuryMatrix &in, MercuryMatrix &out, int iLine, float fAmount)
void TranslateSector (MercuryMatrix &in, MercuryMatrix &out, int iLine, int iLine2, float fAmount)
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 (MQuaternion a, MQuaternion b)
MQuaternion evenProduct (MQuaternion a, MQuaternion b)
MercuryPoint oddProduct (MQuaternion a, MQuaternion b)
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 = MercuryPoint( 0,0,0 )
 Vector of all 0's (0,0,0).
const MercuryPoint gpOne = MercuryPoint( 1,1,1 )
 Vector of all 1's (1,1,1).


Function Documentation

void AngleMatrix ( const MercuryPoint angles,
MercuryMatrix matrix 
)

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 ( MQuaternion  a,
MQuaternion  b 
)

Definition at line 513 of file MercuryTypes.cpp.

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 ( MQuaternion  a,
MQuaternion  b 
)

Definition at line 523 of file MercuryTypes.cpp.

MercuryPoint outerProduct ( MQuaternion  a,
MQuaternion  b 
)

Definition at line 503 of file MercuryTypes.cpp.

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.

void ScaleSector ( MercuryMatrix in,
MercuryMatrix out,
int  iLine,
float  fAmount 
)

Definition at line 211 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 TranslateSector ( MercuryMatrix in,
MercuryMatrix out,
int  iLine,
int  iLine2,
float  fAmount 
)

Definition at line 219 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 = MercuryPoint( 1,1,1 )

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

Definition at line 554 of file MercuryTypes.cpp.

const MercuryPoint gpZero = MercuryPoint( 0,0,0 )

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

Definition at line 553 of file MercuryTypes.cpp.


Hosted by SourceForge.net Logo