36 void multpoint3d (
const double[3],
double[3])
const;
39 void multnorm3d (
const double[3],
double[3])
const;
42 void multpoint4d (
const double[4],
double[4])
const;
67 void rot(
double,
char);
73 void transvec(
double x,
double y,
double z);
83 void scale(
double,
double,
double);
87 void window(
double,
double,
double,
double,
double,
double);
90 void ortho(
double,
double,
double,
double,
double,
double);
93 void ortho2(
double,
double,
double,
double);
101 void lookat(
double,
double,
double,
double,
double,
double,
short);
void identity(void)
clears the matrix (resets it to identity)
Matrix4 & operator=(const Matrix4 &m)
Matrix4(const Matrix4 &m)
copy constructor
void transvecinv(double x, double y, double z)
apply a rotation such that the given vector is brought along 'x'.
Matrix4(void)
identity constructor
void multnorm3d(const double[3], double[3]) const
multiplies a 3D norm (first arg) by the Matrix, returns in second arg
void print_Matrix4(const Matrix4 *mat4)
Print formatted matrix.
void lookat(double, double, double, double, double, double, short)
void trans_from_rotate(const double mat3[9], Matrix4 *mat4)
Transform 3x3 into 4x4 matrix:
void window(double, double, double, double, double, double)
sets this matrix to represent a window perspective
void scale(double, double, double)
performs scaling
4x4 matrix class with numerous operators, conversions, etc.
void loadmatrix(const Matrix4 &m)
replaces this matrix with the given one
void multpoint3d(const double[3], double[3]) const
multiplies a 3D point (first arg) by the Matrix, returns in second arg
Matrix4(double f)
const elements constructor
void multpoint4d(const double[4], double[4]) const
multiplies a 4D point (first arg) by the Matrix, returns in second arg
void rotate_axis(const double axis[3], double angle)
apply a rotation around the given vector; angle in radians.
void ortho2(double, double, double, double)
sets this matrix to a 2D orthographic matrix
double mat[16]
the matrix itself
void transvec(double x, double y, double z)
apply a rotation such that 'x' is brought along the given vector.
void transpose(void)
transposes the matrix
void translate(double, double, double)
performs a translation
void translate(double d[3])
void rot(double, char)
performs a left-handed rotation around an axis (char == 'x', 'y', or 'z')
void multmatrix(const Matrix4 &)
premultiply the matrix by the given matrix, this->other * this
void constant(double)
sets the matrix so all items are the given constant value
void ortho(double, double, double, double, double, double)
sets this matrix to a 3D orthographic matrix