Classes | Defines | Typedefs | Functions
math.h File Reference

Defines basic math and gemoetric primitives. dReal is defined in ODE. Any functions not in here like conversions between quaterions and matrices are most likely defined in ODE. Originally from OpenRAVE (http://openrave.programmingvision.com) More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AABB
struct  OBB
class  RaveTransform< T >
 affine transformation parameterized with quaterions More...
class  RaveTransformMatrix< T >
 affine transformation parameterized with rotation matrices More...
class  RaveVector< T >
struct  RAY
struct  TRIANGLE

Defines

#define _R(i, j)   R[(i)*4+(j)]
#define dCos(x)   (cosf(x))
#define distinctRoots   0
#define dRecip(x)   ((1.0f/(x)))
#define dSin(x)   (sinf(x))
#define dSINGLE
#define dSqrt(x)   (sqrtf(x))
#define floatRoot01   2
#define floatRoot12   4
#define g_fEpsilon   1e-8
#define MULT3(stride)
#define rswap(x, y)   *(int*)&(x) ^= *(int*)&(y) ^= *(int*)&(x) ^= *(int*)&(y);
#define singleRoot   1
#define tripleRoot   6

Typedefs

typedef dReal dMatrix3 [4 *3]
typedef dReal dMatrix4 [4 *4]
typedef dReal dMatrix6 [8 *6]
typedef dReal dQuaternion [4]
typedef float dReal
typedef dReal dVector3 [4]
typedef dReal dVector4 [4]
typedef RaveTransform< dRealTransform
typedef RaveTransformMatrix
< dReal
TransformMatrix
typedef RaveVector< dRealVector

Functions

template<class T >
T_cross3 (T *pfout, const T *pf1, const T *pf2)
template<class T >
T _dot2 (const T *pf1, const T *pf2)
template<class T >
T _dot3 (const T *pf1, const T *pf2)
template<class T >
T _dot4 (const T *pf1, const T *pf2)
template<class T >
T_inv3 (const T *pf, T *pfres, T *pfdet, int stride)
template<class T >
T_inv4 (const T *pf, T *pfres)
template<class T >
T _lengthsqr2 (const T *pf)
template<class T >
T _lengthsqr3 (const T *pf)
template<class T >
T _lengthsqr4 (const T *pf)
template<class T >
T_mult3_s3 (T *pfres, const T *pf1, const T *pf2)
 mult3 with a 3x3 matrix whose row stride is 12 bytes
template<class T >
T_mult3_s4 (T *pfres, const T *pf1, const T *pf2)
 mult3 with a 3x3 matrix whose row stride is 16 bytes
template<class T >
T_mult4 (T *pfres, const T *p1, const T *p2)
template<class T >
T_multtrans3 (T *pfres, const T *pf1, const T *pf2)
template<class T >
T_multtrans4 (T *pfres, const T *pf1, const T *pf2)
template<class T >
T_normalize2 (T *pfout, const T *pf)
template<class T >
T_normalize3 (T *pfout, const T *pf)
template<class T >
T_normalize4 (T *pfout, const T *pf)
template<class T >
T_transnorm3 (T *pfout, const T *pfmat, const T *pf)
template<class T >
T_transpose3 (const T *pf, T *pfres)
template<class T >
T_transpose4 (const T *pf, T *pfres)
template<class T >
void add (T *pf1, T *pf2, int r)
template<class T >
RaveVector< TAxisAngle2Quat (const RaveVector< T > &rotaxis, T angle)
float * cross3 (float *pfout, const float *pf1, const float *pf2)
double * cross3 (double *pfout, const double *pf1, const double *pf2)
int CubicRoots (double c0, double c1, double c2, double *r0, double *r1, double *r2)
dReal DistVertexOBBSq (const Vector &v, const OBB &o)
template<class T >
T dot (T *pf1, T *pf2, int length)
float dot2 (const float *pf1, const float *pf2)
double dot2 (const double *pf1, const double *pf2)
float dot3 (const float *pf1, const float *pf2)
double dot3 (const double *pf1, const double *pf2)
float dot4 (const float *pf1, const float *pf2)
double dot4 (const double *pf1, const double *pf2)
void dQfromR (dQuaternion q, const dMatrix3 R)
void dQMultiply0 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc)
template<class T >
RaveVector< TdQSlerp (const RaveVector< T > &qa, const RaveVector< T > &qb, T t)
void dRfromQ (dMatrix3 R, const dQuaternion q)
bool eig2 (const dReal *pfmat, dReal *peigs, dReal &fv1x, dReal &fv1y, dReal &fv2x, dReal &fv2y)
void EigenSymmetric3 (dReal *fCovariance, dReal *eval, dReal *fAxes)
void GetCovarBasisVectors (dReal fCovariance[3][3], Vector *vRight, Vector *vUp, Vector *vDir)
Vector GetRandomQuat (void)
int insideQuadrilateral (const Vector *p0, const Vector *p1, const Vector *p2, const Vector *p3)
int insideTriangle (const Vector *p0, const Vector *p1, const Vector *p2)
template<class T >
bool inv2 (T *pf, T *pfres)
float * inv3 (const float *pf, float *pfres, float *pfdet, int stride)
double * inv3 (const double *pf, double *pfres, double *pfdet, int stride)
float * inv4 (const float *pf, float *pfres)
double * inv4 (const double *pf, double *pfres)
template<class T >
T lengthsqr (const T *pf1, const T *pf2, int length)
float lengthsqr2 (const float *pf)
double lengthsqr2 (const double *pf)
float lengthsqr3 (const float *pf)
double lengthsqr3 (const double *pf)
float lengthsqr4 (const float *pf)
double lengthsqr4 (const double *pf)
template<class T >
T matrixdet3 (const T *pf, int stride)
 calculates the determinant of a 3x3 matrix whose row stride stride elements
template<class T >
int Max (T *pts, int stride, int numPts)
template<class T >
int Min (T *pts, int stride, int numPts)
template<class T >
void mult (T *pf, T fa, int r)
template<class T , class R , class S >
S * mult (T *pf1, R *pf2, int r1, int c1, int c2, S *pfres, bool badd=false)
float * mult3_s3 (float *pfres, const float *pf1, const float *pf2)
double * mult3_s3 (double *pfres, const double *pf1, const double *pf2)
float * mult3_s4 (float *pfres, const float *pf1, const float *pf2)
double * mult3_s4 (double *pfres, const double *pf1, const double *pf2)
float * mult4 (float *pfres, const float *pf1, const float *pf2)
double * mult4 (double *pfres, const double *pf1, const double *pf2)
template<class T >
Tmultto1 (T *pf1, T *pf2, int r1, int c1, T *pftemp=NULL)
template<class T , class S >
Tmultto2 (T *pf1, S *pf2, int r2, int c2, S *pftemp=NULL)
template<class T , class R , class S >
S * multtrans (T *pf1, R *pf2, int r1, int c1, int c2, S *pfres, bool badd=false)
float * multtrans3 (float *pfres, const float *pf1, const float *pf2)
double * multtrans3 (double *pfres, const double *pf1, const double *pf2)
float * multtrans4 (float *pfres, const float *pf1, const float *pf2)
double * multtrans4 (double *pfres, const double *pf1, const double *pf2)
template<class T , class R , class S >
S * multtrans_to2 (T *pf1, R *pf2, int r1, int c1, int r2, S *pfres, bool badd=false)
float * normalize2 (float *pfout, const float *pf)
double * normalize2 (double *pfout, const double *pf)
float * normalize3 (float *pfout, const float *pf)
double * normalize3 (double *pfout, const double *pf)
float * normalize4 (float *pfout, const float *pf)
double * normalize4 (double *pfout, const double *pf)
template<class T >
T normsqr (const T *pf1, int r)
template<class T >
RaveVector< Toperator* (float f, const RaveVector< T > &left)
template<class T >
RaveVector< Toperator* (double f, const RaveVector< T > &left)
template<class T , class U >
std::basic_ostream< T > & operator<< (std::basic_ostream< T > &O, const RaveVector< U > &v)
template<class T , class U >
std::basic_ostream< T > & operator<< (std::basic_ostream< T > &O, const RaveTransform< U > &v)
template<class T , class U >
std::basic_ostream< T > & operator<< (std::basic_ostream< T > &O, const RaveTransformMatrix< U > &v)
template<class T , class U >
std::basic_istream< T > & operator>> (std::basic_istream< T > &I, RaveVector< U > &v)
template<class T , class U >
std::basic_istream< T > & operator>> (std::basic_istream< T > &I, RaveTransform< U > &v)
template<class T , class U >
std::basic_istream< T > & operator>> (std::basic_istream< T > &I, RaveTransformMatrix< U > &v)
bool QLAlgorithm3 (float *m_aafEntry, float *afDiag, float *afSubDiag)
bool QLAlgorithm3 (double *m_aafEntry, double *afDiag, double *afSubDiag)
void QuadraticSolver (dReal *pfQuadratic, dReal *pfRoots)
template<class T >
T RAD_2_DEG (T radians)
float RaveAcos (float f)
double RaveAcos (double f)
float RaveCos (float f)
double RaveCos (double f)
float RaveFabs (float f)
double RaveFabs (double f)
float RaveSin (float f)
double RaveSin (double f)
float RaveSqrt (float f)
double RaveSqrt (double f)
bool RayOBBTest (const RAY &r, const OBB &obb)
template<class T >
int solvequad (T a, T b, T c, T &r1, T &r2)
template<class T >
void sub (T *pf1, T *pf2, int r)
template<class T >
T sum (T *pf, int length)
void svd3 (const dReal *A, dReal *U, dReal *D, dReal *V)
dRealtranscoord3 (dReal *pfout, const TransformMatrix *pmat, const dReal *pf)
 computes (*pmat) * v
template<class T >
Ttranscoord3 (T *pfout, const RaveTransformMatrix< T > *pmat, const T *pf)
float * transnorm3 (float *pfout, const float *pfmat, const float *pf)
double * transnorm3 (double *pfout, const double *pfmat, const double *pf)
dRealtransnorm3 (dReal *pfout, const TransformMatrix *pmat, const dReal *pf)
 uses only 3x3 upper submatrix
template<class T >
Ttransnorm3 (T *pfout, const RaveTransformMatrix< T > *pmat, const T *pf)
float * transpose3 (const float *pf, float *pfres)
double * transpose3 (const double *pf, double *pfres)
float * transpose4 (const float *pf, float *pfres)
double * transpose4 (const double *pf, double *pfres)
template<class T , class S >
void Tridiagonal3 (S *mat, T *diag, T *subd)
bool TriTriCollision (const RaveVector< float > &u1, const RaveVector< float > &u2, const RaveVector< float > &u3, const RaveVector< float > &v1, const RaveVector< float > &v2, const RaveVector< float > &v3, RaveVector< float > &contactpos, RaveVector< float > &contactnorm)
bool TriTriCollision (const RaveVector< double > &u1, const RaveVector< double > &u2, const RaveVector< double > &u3, const RaveVector< double > &v1, const RaveVector< double > &v2, const RaveVector< double > &v3, RaveVector< double > &contactpos, RaveVector< double > &contactnorm)

Detailed Description

Defines basic math and gemoetric primitives. dReal is defined in ODE. Any functions not in here like conversions between quaterions and matrices are most likely defined in ODE. Originally from OpenRAVE (http://openrave.programmingvision.com)

--------------------------------------------------------------------

--------------------------------------------------------------------

Definition in file math.h.


Define Documentation

#define _R (   i,
 
)    R[(i)*4+(j)]

Definition at line 57 of file math.h.

#define dCos (   x)    (cosf(x))

Definition at line 42 of file math.h.

#define distinctRoots   0

Definition at line 152 of file math.h.

#define dRecip (   x)    ((1.0f/(x)))

Definition at line 40 of file math.h.

#define dSin (   x)    (sinf(x))

Definition at line 41 of file math.h.

#define dSINGLE

Definition at line 35 of file math.h.

#define dSqrt (   x)    (sqrtf(x))

Definition at line 39 of file math.h.

#define floatRoot01   2

Definition at line 154 of file math.h.

#define floatRoot12   4

Definition at line 155 of file math.h.

#define g_fEpsilon   1e-8

Definition at line 151 of file math.h.

#define MULT3 (   stride)
Value:
{ \
        pfres2[0*stride+0] = pf1[0*stride+0]*pf2[0*stride+0]+pf1[0*stride+1]*pf2[1*stride+0]+pf1[0*stride+2]*pf2[2*stride+0]; \
        pfres2[0*stride+1] = pf1[0*stride+0]*pf2[0*stride+1]+pf1[0*stride+1]*pf2[1*stride+1]+pf1[0*stride+2]*pf2[2*stride+1]; \
        pfres2[0*stride+2] = pf1[0*stride+0]*pf2[0*stride+2]+pf1[0*stride+1]*pf2[1*stride+2]+pf1[0*stride+2]*pf2[2*stride+2]; \
        pfres2[1*stride+0] = pf1[1*stride+0]*pf2[0*stride+0]+pf1[1*stride+1]*pf2[1*stride+0]+pf1[1*stride+2]*pf2[2*stride+0]; \
        pfres2[1*stride+1] = pf1[1*stride+0]*pf2[0*stride+1]+pf1[1*stride+1]*pf2[1*stride+1]+pf1[1*stride+2]*pf2[2*stride+1]; \
        pfres2[1*stride+2] = pf1[1*stride+0]*pf2[0*stride+2]+pf1[1*stride+1]*pf2[1*stride+2]+pf1[1*stride+2]*pf2[2*stride+2]; \
        pfres2[2*stride+0] = pf1[2*stride+0]*pf2[0*stride+0]+pf1[2*stride+1]*pf2[1*stride+0]+pf1[2*stride+2]*pf2[2*stride+0]; \
        pfres2[2*stride+1] = pf1[2*stride+0]*pf2[0*stride+1]+pf1[2*stride+1]*pf2[1*stride+1]+pf1[2*stride+2]*pf2[2*stride+1]; \
        pfres2[2*stride+2] = pf1[2*stride+0]*pf2[0*stride+2]+pf1[2*stride+1]*pf2[1*stride+2]+pf1[2*stride+2]*pf2[2*stride+2]; \
}

Definition at line 820 of file math.h.

#define rswap (   x,
  y 
)    *(int*)&(x) ^= *(int*)&(y) ^= *(int*)&(x) ^= *(int*)&(y);

Definition at line 149 of file math.h.

#define singleRoot   1

Definition at line 153 of file math.h.

#define tripleRoot   6

Definition at line 156 of file math.h.


Typedef Documentation

typedef dReal dMatrix3[4 *3]

Definition at line 52 of file math.h.

typedef dReal dMatrix4[4 *4]

Definition at line 53 of file math.h.

typedef dReal dMatrix6[8 *6]

Definition at line 54 of file math.h.

typedef dReal dQuaternion[4]

Definition at line 55 of file math.h.

typedef float dReal

Definition at line 38 of file math.h.

typedef dReal dVector3[4]

Definition at line 50 of file math.h.

typedef dReal dVector4[4]

Definition at line 51 of file math.h.

Definition at line 444 of file math.h.

Definition at line 569 of file math.h.

Definition at line 336 of file math.h.


Function Documentation

template<class T >
T* _cross3 ( T pfout,
const T pf1,
const T pf2 
) [inline]

Definition at line 1273 of file math.h.

template<class T >
T _dot2 ( const T pf1,
const T pf2 
) [inline]

Definition at line 1187 of file math.h.

template<class T >
T _dot3 ( const T pf1,
const T pf2 
) [inline]

Definition at line 1194 of file math.h.

template<class T >
T _dot4 ( const T pf1,
const T pf2 
) [inline]

Definition at line 1201 of file math.h.

template<class T >
T* _inv3 ( const T pf,
T pfres,
T pfdet,
int  stride 
) [inline]

stride is in T if pfdet is not NULL, fills it with the determinant of the source matrix

Definition at line 1016 of file math.h.

template<class T >
T* _inv4 ( const T pf,
T pfres 
) [inline]

Definition at line 1069 of file math.h.

template<class T >
T _lengthsqr2 ( const T pf) [inline]

Definition at line 1208 of file math.h.

template<class T >
T _lengthsqr3 ( const T pf) [inline]

Definition at line 1215 of file math.h.

template<class T >
T _lengthsqr4 ( const T pf) [inline]

Definition at line 1222 of file math.h.

template<class T >
T* _mult3_s3 ( T pfres,
const T pf1,
const T pf2 
) [inline]

mult3 with a 3x3 matrix whose row stride is 12 bytes

Definition at line 851 of file math.h.

template<class T >
T* _mult3_s4 ( T pfres,
const T pf1,
const T pf2 
) [inline]

mult3 with a 3x3 matrix whose row stride is 16 bytes

Definition at line 834 of file math.h.

template<class T >
T* _mult4 ( T pfres,
const T p1,
const T p2 
) [inline]

Definition at line 868 of file math.h.

template<class T >
T* _multtrans3 ( T pfres,
const T pf1,
const T pf2 
) [inline]

Definition at line 901 of file math.h.

template<class T >
T* _multtrans4 ( T pfres,
const T pf1,
const T pf2 
) [inline]

Definition at line 925 of file math.h.

template<class T >
T* _normalize2 ( T pfout,
const T pf 
) [inline]

Definition at line 1229 of file math.h.

template<class T >
T* _normalize3 ( T pfout,
const T pf 
) [inline]

Definition at line 1242 of file math.h.

template<class T >
T* _normalize4 ( T pfout,
const T pf 
) [inline]

Definition at line 1257 of file math.h.

template<class T >
T* _transnorm3 ( T pfout,
const T pfmat,
const T pf 
) [inline]

Definition at line 1308 of file math.h.

template<class T >
T* _transpose3 ( const T pf,
T pfres 
) [inline]

Definition at line 1146 of file math.h.

template<class T >
T* _transpose4 ( const T pf,
T pfres 
) [inline]

Definition at line 1165 of file math.h.

template<class T >
void add ( T pf1,
T pf2,
int  r 
) [inline]

Definition at line 1596 of file math.h.

template<class T >
RaveVector<T> AxisAngle2Quat ( const RaveVector< T > &  rotaxis,
T  angle 
) [inline]

Definition at line 962 of file math.h.

float * cross3 ( float *  pfout,
const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1370 of file math.h.

double * cross3 ( double *  pfout,
const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1401 of file math.h.

int CubicRoots ( double  c0,
double  c1,
double  c2,
double *  r0,
double *  r1,
double *  r2 
)
dReal DistVertexOBBSq ( const Vector v,
const OBB o 
)
template<class T >
T dot ( T pf1,
T pf2,
int  length 
) [inline]

Definition at line 1641 of file math.h.

float dot2 ( const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1358 of file math.h.

double dot2 ( const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1389 of file math.h.

float dot3 ( const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1359 of file math.h.

double dot3 ( const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1390 of file math.h.

float dot4 ( const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1360 of file math.h.

double dot4 ( const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1391 of file math.h.

void dQfromR ( dQuaternion  q,
const dMatrix3  R 
) [inline]

Definition at line 90 of file math.h.

void dQMultiply0 ( dQuaternion  qa,
const dQuaternion  qb,
const dQuaternion  qc 
) [inline]

Definition at line 60 of file math.h.

template<class T >
RaveVector<T> dQSlerp ( const RaveVector< T > &  qa,
const RaveVector< T > &  qb,
T  t 
) [inline]

Definition at line 970 of file math.h.

void dRfromQ ( dMatrix3  R,
const dQuaternion  q 
) [inline]

Definition at line 69 of file math.h.

bool eig2 ( const dReal pfmat,
dReal peigs,
dReal fv1x,
dReal fv1y,
dReal fv2x,
dReal fv2y 
) [inline]

Definition at line 763 of file math.h.

void EigenSymmetric3 ( dReal fCovariance,
dReal eval,
dReal fAxes 
)
void GetCovarBasisVectors ( dReal  fCovariance[3][3],
Vector vRight,
Vector vUp,
Vector vDir 
)
Vector GetRandomQuat ( void  ) [inline]

Definition at line 941 of file math.h.

int insideQuadrilateral ( const Vector p0,
const Vector p1,
const Vector p2,
const Vector p3 
)
int insideTriangle ( const Vector p0,
const Vector p1,
const Vector p2 
)
template<class T >
bool inv2 ( T pf,
T pfres 
) [inline]

Definition at line 1663 of file math.h.

float * inv3 ( const float *  pf,
float *  pfres,
float *  pfdet,
int  stride 
) [inline]

Definition at line 1376 of file math.h.

double * inv3 ( const double *  pf,
double *  pfres,
double *  pfdet,
int  stride 
) [inline]

Definition at line 1407 of file math.h.

float * inv4 ( const float *  pf,
float *  pfres 
) [inline]

Definition at line 1377 of file math.h.

double * inv4 ( const double *  pf,
double *  pfres 
) [inline]

Definition at line 1408 of file math.h.

template<class T >
T lengthsqr ( const T pf1,
const T pf2,
int  length 
) [inline]

Definition at line 1629 of file math.h.

float lengthsqr2 ( const float *  pf) [inline]

Definition at line 1362 of file math.h.

double lengthsqr2 ( const double *  pf) [inline]

Definition at line 1393 of file math.h.

float lengthsqr3 ( const float *  pf) [inline]

Definition at line 1363 of file math.h.

double lengthsqr3 ( const double *  pf) [inline]

Definition at line 1394 of file math.h.

float lengthsqr4 ( const float *  pf) [inline]

Definition at line 1364 of file math.h.

double lengthsqr4 ( const double *  pf) [inline]

Definition at line 1395 of file math.h.

template<class T >
T matrixdet3 ( const T pf,
int  stride 
) [inline]

calculates the determinant of a 3x3 matrix whose row stride stride elements

Definition at line 1006 of file math.h.

template<class T >
int Max ( T pts,
int  stride,
int  numPts 
)

Definition at line 1740 of file math.h.

template<class T >
int Min ( T pts,
int  stride,
int  numPts 
)

Definition at line 1726 of file math.h.

template<class T >
void mult ( T pf,
T  fa,
int  r 
) [inline]

Definition at line 1420 of file math.h.

template<class T , class R , class S >
S * mult ( T pf1,
R pf2,
int  r1,
int  c1,
int  c2,
S *  pfres,
bool  badd = false 
) [inline]

Definition at line 1431 of file math.h.

float * mult3_s3 ( float *  pfres,
const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1374 of file math.h.

double * mult3_s3 ( double *  pfres,
const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1405 of file math.h.

float * mult3_s4 ( float *  pfres,
const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1373 of file math.h.

double * mult3_s4 ( double *  pfres,
const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1404 of file math.h.

float * mult4 ( float *  pfres,
const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1349 of file math.h.

double * mult4 ( double *  pfres,
const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1380 of file math.h.

template<class T >
T * multto1 ( T pf1,
T pf2,
int  r1,
int  c1,
T pftemp = NULL 
) [inline]

Definition at line 1517 of file math.h.

template<class T , class S >
T * multto2 ( T pf1,
S *  pf2,
int  r2,
int  c2,
S *  pftemp = NULL 
) [inline]

Definition at line 1554 of file math.h.

template<class T , class R , class S >
S * multtrans ( T pf1,
R pf2,
int  r1,
int  c1,
int  c2,
S *  pfres,
bool  badd = false 
) [inline]

Definition at line 1459 of file math.h.

float * multtrans3 ( float *  pfres,
const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1351 of file math.h.

double * multtrans3 ( double *  pfres,
const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1382 of file math.h.

float * multtrans4 ( float *  pfres,
const float *  pf1,
const float *  pf2 
) [inline]

Definition at line 1352 of file math.h.

double * multtrans4 ( double *  pfres,
const double *  pf1,
const double *  pf2 
) [inline]

Definition at line 1383 of file math.h.

template<class T , class R , class S >
S * multtrans_to2 ( T pf1,
R pf2,
int  r1,
int  c1,
int  r2,
S *  pfres,
bool  badd = false 
) [inline]

Definition at line 1490 of file math.h.

float * normalize2 ( float *  pfout,
const float *  pf 
) [inline]

Definition at line 1366 of file math.h.

double * normalize2 ( double *  pfout,
const double *  pf 
) [inline]

Definition at line 1397 of file math.h.

float * normalize3 ( float *  pfout,
const float *  pf 
) [inline]

Definition at line 1367 of file math.h.

double * normalize3 ( double *  pfout,
const double *  pf 
) [inline]

Definition at line 1398 of file math.h.

float * normalize4 ( float *  pfout,
const float *  pf 
) [inline]

Definition at line 1368 of file math.h.

double * normalize4 ( double *  pfout,
const double *  pf 
) [inline]

Definition at line 1399 of file math.h.

template<class T >
T normsqr ( const T pf1,
int  r 
) [inline]

Definition at line 1616 of file math.h.

template<class T >
RaveVector<T> operator* ( float  f,
const RaveVector< T > &  left 
) [inline]

Definition at line 339 of file math.h.

template<class T >
RaveVector<T> operator* ( double  f,
const RaveVector< T > &  left 
) [inline]

Definition at line 350 of file math.h.

template<class T , class U >
std::basic_ostream<T>& operator<< ( std::basic_ostream< T > &  O,
const RaveVector< U > &  v 
)

Definition at line 1757 of file math.h.

template<class T , class U >
std::basic_ostream<T>& operator<< ( std::basic_ostream< T > &  O,
const RaveTransform< U > &  v 
)

Definition at line 1769 of file math.h.

template<class T , class U >
std::basic_ostream<T>& operator<< ( std::basic_ostream< T > &  O,
const RaveTransformMatrix< U > &  v 
)

Definition at line 1783 of file math.h.

template<class T , class U >
std::basic_istream<T>& operator>> ( std::basic_istream< T > &  I,
RaveVector< U > &  v 
)

Definition at line 1763 of file math.h.

template<class T , class U >
std::basic_istream<T>& operator>> ( std::basic_istream< T > &  I,
RaveTransform< U > &  v 
)

Definition at line 1776 of file math.h.

template<class T , class U >
std::basic_istream<T>& operator>> ( std::basic_istream< T > &  I,
RaveTransformMatrix< U > &  v 
)

Definition at line 1793 of file math.h.

bool QLAlgorithm3 ( float *  m_aafEntry,
float *  afDiag,
float *  afSubDiag 
)
bool QLAlgorithm3 ( double *  m_aafEntry,
double *  afDiag,
double *  afSubDiag 
)
void QuadraticSolver ( dReal pfQuadratic,
dReal pfRoots 
)
template<class T >
T RAD_2_DEG ( T  radians) [inline]

Definition at line 158 of file math.h.

float RaveAcos ( float  f) [inline]

Definition at line 236 of file math.h.

double RaveAcos ( double  f) [inline]

Definition at line 237 of file math.h.

float RaveCos ( float  f) [inline]

Definition at line 232 of file math.h.

double RaveCos ( double  f) [inline]

Definition at line 233 of file math.h.

float RaveFabs ( float  f) [inline]

Definition at line 234 of file math.h.

double RaveFabs ( double  f) [inline]

Definition at line 235 of file math.h.

float RaveSin ( float  f) [inline]

Definition at line 230 of file math.h.

double RaveSin ( double  f) [inline]

Definition at line 231 of file math.h.

float RaveSqrt ( float  f) [inline]

Definition at line 228 of file math.h.

double RaveSqrt ( double  f) [inline]

Definition at line 229 of file math.h.

bool RayOBBTest ( const RAY r,
const OBB obb 
)
template<class T >
int solvequad ( T  a,
T  b,
T  c,
T r1,
T r2 
) [inline]

Definition at line 800 of file math.h.

template<class T >
void sub ( T pf1,
T pf2,
int  r 
) [inline]
template<class T >
T sum ( T pf,
int  length 
) [inline]

Definition at line 1652 of file math.h.

void svd3 ( const dReal A,
dReal U,
dReal D,
dReal V 
)

SVD of a 3x3 matrix A such that A = U*diag(D)*V' where U is a 3x3 matrix, V is a 3x3 matrix, and D is a 3x1 vector The row stride for all matrices is 9 bytes

dReal* transcoord3 ( dReal pfout,
const TransformMatrix pmat,
const dReal pf 
) [inline]

computes (*pmat) * v

template<class T >
T* transcoord3 ( T pfout,
const RaveTransformMatrix< T > *  pmat,
const T pf 
) [inline]

Definition at line 1287 of file math.h.

float * transnorm3 ( float *  pfout,
const float *  pfmat,
const float *  pf 
) [inline]

Definition at line 1353 of file math.h.

double * transnorm3 ( double *  pfout,
const double *  pfmat,
const double *  pf 
) [inline]

Definition at line 1384 of file math.h.

dReal* transnorm3 ( dReal pfout,
const TransformMatrix pmat,
const dReal pf 
) [inline]

uses only 3x3 upper submatrix

template<class T >
T* transnorm3 ( T pfout,
const RaveTransformMatrix< T > *  pmat,
const T pf 
) [inline]

Definition at line 1329 of file math.h.

float * transpose3 ( const float *  pf,
float *  pfres 
) [inline]

Definition at line 1355 of file math.h.

double * transpose3 ( const double *  pf,
double *  pfres 
) [inline]

Definition at line 1386 of file math.h.

float * transpose4 ( const float *  pf,
float *  pfres 
) [inline]

Definition at line 1356 of file math.h.

double * transpose4 ( const double *  pf,
double *  pfres 
) [inline]

Definition at line 1387 of file math.h.

template<class T , class S >
void Tridiagonal3 ( S *  mat,
T diag,
T subd 
)

Definition at line 1688 of file math.h.

bool TriTriCollision ( const RaveVector< float > &  u1,
const RaveVector< float > &  u2,
const RaveVector< float > &  u3,
const RaveVector< float > &  v1,
const RaveVector< float > &  v2,
const RaveVector< float > &  v3,
RaveVector< float > &  contactpos,
RaveVector< float > &  contactnorm 
)
bool TriTriCollision ( const RaveVector< double > &  u1,
const RaveVector< double > &  u2,
const RaveVector< double > &  u3,
const RaveVector< double > &  v1,
const RaveVector< double > &  v2,
const RaveVector< double > &  v3,
RaveVector< double > &  contactpos,
RaveVector< double > &  contactnorm 
)


checkerboard_detector
Author(s): Rosen Diankov (rdiankov@cs.cmu.edu)
autogenerated on Wed Sep 16 2015 04:37:41