Honeycomb  0.1
Component-Model Framework
Namespaces | Macros
Matrix4.cpp File Reference
#include "Honey/Math/Alge/Matrix/Matrix4.h"
#include "Honey/Math/Alge/Transform.h"
#include "Honey/Math/Alge/Matrix/platform/Matrix4.h"
Include dependency graph for Matrix4.cpp:

Namespaces

 honey
 Global Honeycomb namespace.
 

Macros

#define Section_Source
 
#define mat_pad(A)   (A[W][X]=A[X][W]=A[W][Y]=A[Y][W]=A[W][Z]=A[Z][W]=0,A[W][W]=1)
 
#define mat_copy(C, gets, A, n)
 
#define mat_tpose(AT, gets, A, n)
 
#define mat_binop(C, gets, A, op, B, n)
 
#define caseMacro(i, j, k, I, J, K)
 
#define TOL   1.0e-6
 
#define SQRTHALF   (0.7071067811865475244)
 
#define sgn(n, v)    ((n)?-(v):(v))
 
#define swap(a, i, j)   {a[3]=a[i]; a[i]=a[j]; a[j]=a[3];}
 
#define cycle(a, p)
 

Macro Definition Documentation

#define caseMacro (   i,
  j,
  k,
  I,
  J,
 
)
Value:
case I:\
s = Alge::sqrt( (mat[I][I] - (mat[J][J]+mat[K][K])) + mat[W][W] );\
qu.i = s*0.5;\
s = 0.5 / s;\
qu.j = (mat[I][J] + mat[J][I]) * s;\
qu.k = (mat[K][I] + mat[I][K]) * s;\
qu.w = (mat[K][J] - mat[J][K]) * s;\
break
#define cycle (   a,
 
)
Value:
if (p) {a[3]=a[0]; a[0]=a[1]; a[1]=a[2]; a[2]=a[3];}\
else {a[3]=a[2]; a[2]=a[1]; a[1]=a[0]; a[0]=a[3];}
#define mat_binop (   C,
  gets,
  A,
  op,
  B,
 
)
Value:
{int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++)\
C[i][j] gets (A[i][j]) op (B[i][j]);}

Assign nxn matrix C the element-wise combination of A and B using "op"

#define mat_copy (   C,
  gets,
  A,
 
)
Value:
{int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++)\
C[i][j] gets (A[i][j]);}

Copy nxn matrix A to C using "gets" for assignment

#define mat_pad (   A)    (A[W][X]=A[X][W]=A[W][Y]=A[Y][W]=A[W][Z]=A[Z][W]=0,A[W][W]=1)

Fill out 3x3 matrix to 4x4

#define mat_tpose (   AT,
  gets,
  A,
 
)
Value:
{int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++)\
AT[i][j] gets (A[j][i]);}

Copy transpose of nxn matrix A to C using "gets" for assignment

#define Section_Source
#define sgn (   n,
 
)    ((n)?-(v):(v))
#define SQRTHALF   (0.7071067811865475244)
#define swap (   a,
  i,
 
)    {a[3]=a[i]; a[i]=a[j]; a[j]=a[3];}
#define TOL   1.0e-6