RageMath.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
#ifndef RAGE_MATH_H
00010
#define RAGE_MATH_H
00011
00012 #define PI (3.141592653589793f)
00013 #define DegreeToRadian( degree ) ((degree) * (PI / 180.0f))
00014 #define RadianToDegree( radian ) ((radian) * (180.0f / PI))
00015
00016
00017
struct RageVector2;
00018
struct RageVector3;
00019
struct RageVector4;
00020
struct RageMatrix;
00021
00022
void RageVec3ClearBounds(
RageVector3 &mins,
RageVector3 &maxs );
00023
void RageVec3AddToBounds(
const RageVector3 &p,
RageVector3 &mins,
RageVector3 &maxs );
00024
00025
void RageVec2Normalize(
RageVector2* pOut,
const RageVector2* pV );
00026
void RageVec3Normalize(
RageVector3* pOut,
const RageVector3* pV );
00027
void RageVec3TransformCoord(
RageVector3* pOut,
const RageVector3* pV,
const RageMatrix* pM );
00028
void RageVec3TransformNormal(
RageVector3* pOut,
const RageVector3* pV,
const RageMatrix* pM );
00029
void RageVec4TransformCoord(
RageVector4* pOut,
const RageVector4* pV,
const RageMatrix* pM );
00030
void RageMatrixIdentity(
RageMatrix* pOut );
00031
RageMatrix RageMatrixIdentity();
00032
void RageMatrixMultiply(
RageMatrix* pOut,
const RageMatrix* pA,
const RageMatrix* pB );
00033
void RageMatrixTranslation(
RageMatrix* pOut,
float x,
float y,
float z );
00034
void RageMatrixScaling(
RageMatrix* pOut,
float x,
float y,
float z );
00035
void RageMatrixRotationX(
RageMatrix* pOut,
float fTheta );
00036
void RageMatrixRotationY(
RageMatrix* pOut,
float fTheta );
00037
void RageMatrixRotationZ(
RageMatrix* pOut,
float fTheta );
00038
RageMatrix RageMatrixRotationX(
float fTheta );
00039
RageMatrix RageMatrixRotationY(
float fTheta );
00040
RageMatrix RageMatrixRotationZ(
float fTheta );
00041
void RageMatrixCommand( CString sCommandString,
RageMatrix &mat );
00042
void RageQuatFromHPR(
RageVector4* pOut,
RageVector3 hpr );
00043
void RageQuatFromPRH(
RageVector4* pOut,
RageVector3 prh );
00044
void RageMatrixFromQuat(
RageMatrix* pOut,
const RageVector4 q );
00045
void RageQuatSlerp(
RageVector4 *pOut,
const RageVector4 &from,
const RageVector4 &to,
float t);
00046
RageVector4 RageQuatFromH(
float theta);
00047
RageVector4 RageQuatFromP(
float theta);
00048
RageVector4 RageQuatFromR(
float theta);
00049
void RageQuatMultiply(
RageVector4* pOut,
const RageVector4 &pA,
const RageVector4 &pB );
00050
RageMatrix RageLookAt(
00051
float eyex,
float eyey,
float eyez,
00052
float centerx,
float centery,
float centerz,
00053
float upx,
float upy,
float upz );
00054
void RageMatrixAngles(
RageMatrix* pOut,
const RageVector3 &angles );
00055
void RageMatrixTranspose(
RageMatrix* pOut,
const RageMatrix* pIn );
00056
00057
#endif
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
Generated on Thu Jan 27 20:57:28 2005 for StepMania by
1.3.7