Pyrogenesis
13997
|
Go to the source code of this file.
Macros | |
#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. More... | |
#define | mat_copy(C, gets, A, n) |
Copy nxn matrix A to C using "gets" for assignment. More... | |
#define | mat_tpose(AT, gets, A, n) |
Copy transpose of nxn matrix A to C using "gets" for assignment. More... | |
#define | mat_binop(C, gets, A, op, B, n) |
Assign nxn matrix C the element-wise combination of A and B using "op". More... | |
#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) |
Functions | |
void | mat_mult (HMatrix A, HMatrix B, HMatrix AB) |
Multiply the upper left 3x3 parts of A and B to get AB. More... | |
float | vdot (float *va, float *vb) |
Return dot product of length 3 vectors va and vb. More... | |
void | vcross (float *va, float *vb, float *v) |
Set v to cross product of length 3 vectors va and vb. More... | |
void | adjoint_transpose (HMatrix M, HMatrix MadjT) |
Set MadjT to transpose of inverse of M times determinant of M. More... | |
Quat | Qt_ (float x, float y, float z, float w) |
Quat | Qt_Conj (Quat q) |
Quat | Qt_Mul (Quat qL, Quat qR) |
Quat | Qt_Scale (Quat q, float w) |
Quat | Qt_FromMatrix (HMatrix mat) |
float | mat_norm (HMatrix M, int tpose) |
Compute either the 1 or infinity norm of M, depending on tpose. More... | |
float | norm_inf (HMatrix M) |
float | norm_one (HMatrix M) |
int | find_max_col (HMatrix M) |
Return index of column of M containing maximum abs entry, or -1 if M=0. More... | |
void | make_reflector (float *v, float *u) |
Setup u for Household reflection to zero all v components but first. More... | |
void | reflect_cols (HMatrix M, float *u) |
Apply Householder reflection represented by u to column vectors of M. More... | |
void | reflect_rows (HMatrix M, float *u) |
Apply Householder reflection represented by u to row vectors of M. More... | |
void | do_rank1 (HMatrix M, HMatrix Q) |
Find orthogonal factor Q of rank 1 (or less) M. More... | |
void | do_rank2 (HMatrix M, HMatrix MadjT, HMatrix Q) |
Find orthogonal factor Q of rank 2 (or less) M using adjoint transpose. More... | |
float | polar_decomp (HMatrix M, HMatrix Q, HMatrix S) |
HVect | spect_decomp (HMatrix S, HMatrix U) |
Quat | snuggle (Quat q, HVect *k) |
void | decomp_affine (HMatrix A, AffineParts *parts) |
void | invert_affine (AffineParts *parts, AffineParts *inverse) |
Variables | |
static HMatrix | mat_id = {{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}} |
#define caseMacro | ( | i, | |
j, | |||
k, | |||
I, | |||
J, | |||
K | |||
) |
#define cycle | ( | a, | |
p | |||
) |
#define mat_binop | ( | C, | |
gets, | |||
A, | |||
op, | |||
B, | |||
n | |||
) |
Assign nxn matrix C the element-wise combination of A and B using "op".
Definition at line 43 of file Decompose.cpp.
#define mat_copy | ( | C, | |
gets, | |||
A, | |||
n | |||
) |
Copy nxn matrix A to C using "gets" for assignment.
Definition at line 35 of file Decompose.cpp.
Fill out 3x3 matrix to 4x4.
Definition at line 32 of file Decompose.cpp.
#define mat_tpose | ( | AT, | |
gets, | |||
A, | |||
n | |||
) |
Copy transpose of nxn matrix A to C using "gets" for assignment.
Definition at line 39 of file Decompose.cpp.
#define sgn | ( | n, | |
v | |||
) | ((n)?-(v):(v)) |
#define SQRTHALF (0.7071067811865475244) |
#define swap | ( | a, | |
i, | |||
j | |||
) | {a[3]=a[i]; a[i]=a[j]; a[j]=a[3];} |
#define TOL 1.0e-6 |
Set MadjT to transpose of inverse of M times determinant of M.
Definition at line 69 of file Decompose.cpp.
void decomp_affine | ( | HMatrix | A, |
AffineParts * | parts | ||
) |
Definition at line 486 of file Decompose.cpp.
Find orthogonal factor Q of rank 1 (or less) M.
Definition at line 223 of file Decompose.cpp.
Find orthogonal factor Q of rank 2 (or less) M using adjoint transpose.
Definition at line 241 of file Decompose.cpp.
int find_max_col | ( | HMatrix | M | ) |
Return index of column of M containing maximum abs entry, or -1 if M=0.
Definition at line 181 of file Decompose.cpp.
void invert_affine | ( | AffineParts * | parts, |
AffineParts * | inverse | ||
) |
Definition at line 508 of file Decompose.cpp.
void make_reflector | ( | float * | v, |
float * | u | ||
) |
Setup u for Household reflection to zero all v components but first.
Definition at line 194 of file Decompose.cpp.
Multiply the upper left 3x3 parts of A and B to get AB.
Definition at line 47 of file Decompose.cpp.
float mat_norm | ( | HMatrix | M, |
int | tpose | ||
) |
Compute either the 1 or infinity norm of M, depending on tpose.
Definition at line 164 of file Decompose.cpp.
float norm_inf | ( | HMatrix | M | ) |
Definition at line 177 of file Decompose.cpp.
float norm_one | ( | HMatrix | M | ) |
Definition at line 178 of file Decompose.cpp.
Definition at line 274 of file Decompose.cpp.
Quat Qt_ | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Definition at line 79 of file Decompose.cpp.
Definition at line 87 of file Decompose.cpp.
Definition at line 119 of file Decompose.cpp.
Definition at line 97 of file Decompose.cpp.
Definition at line 108 of file Decompose.cpp.
void reflect_cols | ( | HMatrix | M, |
float * | u | ||
) |
Apply Householder reflection represented by u to column vectors of M.
Definition at line 204 of file Decompose.cpp.
void reflect_rows | ( | HMatrix | M, |
float * | u | ||
) |
Apply Householder reflection represented by u to row vectors of M.
Definition at line 213 of file Decompose.cpp.
Definition at line 381 of file Decompose.cpp.
Definition at line 326 of file Decompose.cpp.
void vcross | ( | float * | va, |
float * | vb, | ||
float * | v | ||
) |
Set v to cross product of length 3 vectors va and vb.
Definition at line 61 of file Decompose.cpp.
float vdot | ( | float * | va, |
float * | vb | ||
) |
Return dot product of length 3 vectors va and vb.
Definition at line 55 of file Decompose.cpp.
|
static |
Definition at line 161 of file Decompose.cpp.