#include <iostream>
#include <math.h>
#include <fvec.h>
#include "utils.inl"
Classes | |
class | GPMatrix |
class | GPVector |
class | GPVector3 |
Defines | |
#define | GPvector4 GPVector |
#define | _mm_ror_ps(vec, i) (((i)%4) ? (_mm_shuffle_ps(vec,vec, _MM_SHUFFLE((unsigned char)(i+3)%4,(unsigned char)(i+2)%4,(unsigned char)(i+1)%4,(unsigned char)(i+0)%4))) : (vec)) |
#define | _mm_rol_ps(vec, i) (((i)%4) ? (_mm_shuffle_ps(vec,vec, _MM_SHUFFLE((unsigned char)(7-i)%4,(unsigned char)(6-i)%4,(unsigned char)(5-i)%4,(unsigned char)(4-i)%4))) : (vec)) |
#define | _mm_abs_ps(vec) _mm_andnot_ps(_MASKSIGN_,vec) |
#define | _mm_neg_ps(vec) _mm_xor_ps(_MASKSIGN_,vec) |
Functions | |
std::ostream & | operator<< (std::ostream &s, const GPMatrix &m) |
std::ostream & | operator<< (std::ostream &s, const GPVector &v) |
std::ostream & | operator<< (std::ostream &s, const GPVector3 &v) |
GPMatrix | ZeroMatrix () |
GPMatrix | IdentityMatrix () |
GPMatrix | TranslateMatrix (const float dx, const float dy, const float dz) |
GPMatrix | ScaleMatrix (const float a, const float b, const float c) |
GPMatrix | ScaleMatrix (const float a) |
GPMatrix | RotateXMatrix (const float rads) |
GPMatrix | RotateYMatrix (const float rads) |
GPMatrix | RotateZMatrix (const float rads) |
void | MatrixMult (const GPMatrix &A, const GPMatrix &B, GPMatrix &Res) |
void | VectorMult (const GPVector &Vec, const GPMatrix &Mat, GPVector &Res) |
GPMatrix | MatrixMult (const GPMatrix &A, const GPMatrix &B) |
GPMatrix | MatrixInverse (GPMatrix &m) |
float | Determinant (GPMatrix &m) |
GPMatrix | MatrixTranspose (GPMatrix &m) |
Variables | |
const F32vec4 | _MASKSIGN_ |
#define _mm_abs_ps | ( | vec | ) | _mm_andnot_ps(_MASKSIGN_,vec) |
#define _mm_neg_ps | ( | vec | ) | _mm_xor_ps(_MASKSIGN_,vec) |
#define _mm_rol_ps | ( | vec, | |||
i | ) | (((i)%4) ? (_mm_shuffle_ps(vec,vec, _MM_SHUFFLE((unsigned char)(7-i)%4,(unsigned char)(6-i)%4,(unsigned char)(5-i)%4,(unsigned char)(4-i)%4))) : (vec)) |
#define _mm_ror_ps | ( | vec, | |||
i | ) | (((i)%4) ? (_mm_shuffle_ps(vec,vec, _MM_SHUFFLE((unsigned char)(i+3)%4,(unsigned char)(i+2)%4,(unsigned char)(i+1)%4,(unsigned char)(i+0)%4))) : (vec)) |
#define GPvector4 GPVector |
float Determinant | ( | GPMatrix & | m | ) | [inline] |
GPMatrix IdentityMatrix | ( | ) | [inline] |
std::ostream& operator<< | ( | std::ostream & | s, | |
const GPVector3 & | v | |||
) |
std::ostream& operator<< | ( | std::ostream & | s, | |
const GPVector & | v | |||
) |
std::ostream& operator<< | ( | std::ostream & | s, | |
const GPMatrix & | m | |||
) |
GPMatrix RotateXMatrix | ( | const float | rads | ) |
GPMatrix RotateYMatrix | ( | const float | rads | ) |
GPMatrix RotateZMatrix | ( | const float | rads | ) |
GPMatrix ScaleMatrix | ( | const float | a | ) |
GPMatrix ScaleMatrix | ( | const float | a, | |
const float | b, | |||
const float | c | |||
) |
GPMatrix TranslateMatrix | ( | const float | dx, | |
const float | dy, | |||
const float | dz | |||
) |
GPMatrix ZeroMatrix | ( | ) | [inline] |
const F32vec4 _MASKSIGN_ |