xmsgrid  1.0
matrix.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
14 //------------------------------------------------------------------------------
15 
16 // 3. Standard Library Headers
17 
18 // 4. External Library Headers
19 #include <xmscore/points/pt.h>
20 
21 // 5. Shared Headers
22 
23 // 6. Non-shared Headers
24 
25 //----- Namespace declaration --------------------------------------------------
26 
27 namespace xms
28 {
29 int mxLUDecomp(double** mat, int n, int* indx, double* d);
30 int mxLUBcksub(double** mat, int n, const int* indx, double* b);
31 bool mxiLudcmp3(double mat[3][3], int indx[3], double* d);
32 void mxiLubksb3(const double mat[3][3], const int indx[3], double b[3]);
33 bool mxSolveNxN(double** A, double* x, double* b, int n);
34 bool mxSolveBandedEquations(double** a, double* x, double* b, int numeqs, int halfbandwidth);
35 bool mxSolve3x3(double A[3][3], double x[3], double b[3]);
36 int mxInvert4x4(const double matrix[4][4], double inv[4][4]);
37 void mxPointMult(Pt3d* pt, const double ctm[4][4]);
38 void mxCopy4x4(double copy[4][4], const double matrix[4][4]);
39 void mxIdent4x4(double matrix[4][4]);
40 void mxMult4x4(double product[4][4], const double matrix1[4][4], const double matrix2[4][4]);
41 void mxRotate4x4(double xrot, double yrot, double zrot, double rMatt[4][4]);
42 void mxTranslate4x4(const Pt3d& a_translation, double a_mx[4][4]);
43 } // namespace xms
void mxRotate4x4(double xrot, double yrot, double zrot, double rMatt[4][4])
return a rotation matrix with specified x, y, z rotations z - y - x order
Definition: matrix.cpp:611
int mxLUBcksub(double **mat, int n, const int *indx, double *b)
solve [mat]{x} = {b} by back substitution (mat = LU of mat), from "Numerical Recipes in C" p 44...
Definition: matrix.cpp:122
void mxMult4x4(double product[4][4], const double matrix1[4][4], const double matrix2[4][4])
Multiplies two transformation matrices.
Definition: matrix.cpp:585
void mxIdent4x4(double matrix[4][4])
Sets a transformation matrix to identity.
Definition: matrix.cpp:571
int mxInvert4x4(const double matrix[4][4], double inv[4][4])
Compute the inverse of a transformation matrix. Checks for special case of Orthogonal 4x4 and does ea...
Definition: matrix.cpp:422
int mxLUDecomp(double **mat, int n, int *indx, double *d)
Decompose an n x n matrix into Upper & Lower trianglar (in place), from "Numerical Recipes in C" p 43...
Definition: matrix.cpp:47
void mxCopy4x4(double copy[4][4], const double matrix[4][4])
Copy a transformation matrix. Simply uses memcpy.
Definition: matrix.cpp:563
bool mxSolveBandedEquations(double **a, double *x, double *b, int numeqs, int halfbandwidth)
Solves the matrix equation [a][x]=[b] using gauss elimination.
Definition: matrix.cpp:325
bool mxSolve3x3(double A[3][3], double x[3], double b[3])
Solves the matrix equation [A]*{x}={b} for {x} where [A] is 3x3 and {x} and {b} are 3x1 vectors...
Definition: matrix.cpp:399
void mxiLubksb3(const double mat[3][3], const int indx[3], double b[3])
solve [mat]{x} = {b} by back substitution (mat = LU of mat)
Definition: matrix.cpp:231
XMS Namespace.
Definition: geoms.cpp:34
void mxPointMult(Pt3d *pt, const double ctm[4][4])
Multiplies a point by a transformation matrix.
Definition: matrix.cpp:549
void mxTranslate4x4(const Pt3d &a_translation, double a_mx[4][4])
return a translation matrix with specified translation z - y - x order
Definition: matrix.cpp:638
bool mxiLudcmp3(double mat[3][3], int indx[3], double *d)
Decomposes a 3 x 3 matrix into Upper & Lower trianglar(in place)
Definition: matrix.cpp:157
bool mxSolveNxN(double **A, double *x, double *b, int n)
Solves the matrix equation [A]*{x}={b} for {x} where [A] is NxN and {x} and {b} are Nx1 vectors...
Definition: matrix.cpp:268