3ds Max C++ API Reference
|
Classes | |
class | DMatrix3 |
Macros | |
#define | MAX_DEPRECATE_MATRIX_BOOL_CTOR(str) [[deprecated(str)]] |
MAX_SILENCE_DEPRECATED_MATRIX_BOOL_CTOR Silences warning when using the Matrix(bool) constructor. | |
Typedefs | |
typedef double | DMRow[3] |
Functions | |
DMatrix3 | RotateXMatrix (double angle) |
Builds a new matrix for use as a X rotation transformation. | |
DMatrix3 | RotateYMatrix (double angle) |
Builds a new matrix for use as a Y rotation transformation. | |
DMatrix3 | RotateZMatrix (double angle) |
Builds a new matrix for use as a Z rotation transformation. | |
DMatrix3 | TransMatrix (const DPoint3 &p) |
Builds a new matrix for use as a translation transformation. | |
DMatrix3 | ScaleMatrix (const DPoint3 &s) |
Builds a new matrix for use as a scale transformation. | |
DMatrix3 | RotateYPRMatrix (double yaw, double pitch, double roll) |
Builds a new matrix for use as a rotation transformation by specifying yaw, pitch and roll angles. | |
DMatrix3 | RotAngleAxisMatrix (const DPoint3 &axis, double angle) |
Builds a new matrix for use as a rotation transformation by specifying an angle and axis. | |
DMatrix3 | Inverse (const DMatrix3 &m) |
Return the inverse of the matrix. | |
DPoint3 | operator* (const DMatrix3 &a, const DPoint3 &v) |
These transform a DPoint3 with a DMatrix3. | |
DPoint3 | operator* (const DPoint3 &v, const DMatrix3 &a) |
These transform a DPoint3 with a DMatrix3. | |
DPoint3 | VectorTransform (const DMatrix3 &m, const DPoint3 &v) |
Transform the vector (DPoint3) with the specified matrix. | |
DPoint3 | VectorTransform (const DPoint3 &v, const DMatrix3 &m) |
Point4 | TransformPlane (const DMatrix3 &m, const Point4 &plane) |
transform a plane. | |
DMatrix3 | XFormMat (const DMatrix3 &xm, const DMatrix3 &m) |
This method is used to build a matrix that constructs a transformation in a particular space. | |
void | MirrorMatrix (DMatrix3 &tm, Axis axis, bool scaleMatrix=false) |
Mirrors the input matrix against the X, Y, or Z axis. | |
void | MatrixMultiply (DMatrix3 &outMatrix, const DMatrix3 &matrixA, const DMatrix3 &matrixB) |
Same as Maxtrix3::operator[]. | |
void | Inverse (DMatrix3 &outMatrix, const DMatrix3 &m) |
Same as Maxtrix3::Inverse. | |
#define MAX_DEPRECATE_MATRIX_BOOL_CTOR | ( | str | ) | [[deprecated(str)]] |
typedef double DMRow[3] |
DMatrix3 RotateXMatrix | ( | double | angle | ) |
Builds a new matrix for use as a X rotation transformation.
angle | Specifies the angle of rotation in radians. |
DMatrix3 RotateYMatrix | ( | double | angle | ) |
Builds a new matrix for use as a Y rotation transformation.
angle | Specifies the angle of rotation in radians. |
DMatrix3 RotateZMatrix | ( | double | angle | ) |
Builds a new matrix for use as a Z rotation transformation.
angle | Specifies the angle of rotation in radians. |
Builds a new matrix for use as a translation transformation.
p | Specifies the translation values. |
Builds a new matrix for use as a scale transformation.
s | Specifies the scale values. |
DMatrix3 RotateYPRMatrix | ( | double | yaw, |
double | pitch, | ||
double | roll | ||
) |
Builds a new matrix for use as a rotation transformation by specifying yaw, pitch and roll angles.
This definition will depend on what our coordinate system is. This one is equivalent to:
Which presupposes Y is vertical, X is sideways, Z is forward
yaw | Specifies the yaw angle in radians. |
pitch | Specifies the pitch angle in radians. |
roll | Specifies the roll angle in radians. |
Builds a new matrix for use as a rotation transformation by specifying an angle and axis.
axis | Specifies the axis of rotation. Note that this angle is expected to be normalized. |
angle | Specifies the angle of rotation. Note: The direction of the angle in this method is opposite of that in AngAxisFromQ(). |
Return the inverse of the matrix.
m | The matrix to compute the inverse of. |
These transform a DPoint3 with a DMatrix3.
These two versions of transforming a point with a matrix do the same thing, regardless of the order of operands (linear algebra rules notwithstanding).
a | The matrix to transform the point with. |
v | The point to transform. |
These transform a DPoint3 with a DMatrix3.
These two versions of transforming a point with a matrix do the same thing, regardless of the order of operands (linear algebra rules notwithstanding).
v | The point to transform. |
a | The matrix to transform the point with. |
transform a plane.
m | The transformation to apply to the plain |
plane | the plane to be transformed |
This method is used to build a matrix that constructs a transformation in a particular space.
For example, say you have a rotation you want to apply, but you want to perform the rotation in another coordinate system. To do this, you typically transform into the space of the coordinate system, then apply the transformation, and then transform out of that coordinate system. This method constructs a matrix that does just this. It transforms matrix m so it is applied in the space of matrix xm. It returns a DMatrix3 that is xm*m*Inverse(xm).
xm | Specifies the coordinate system you want to work in. |
m | Specifies the transformation matrix. |
Mirrors the input matrix against the X, Y, or Z axis.
This function mirrors the input matrix such that if it transformed a DPoint3 p, the transform applied by the mirrored transform would place p in an equivalent position relative but with one of it's elements negated.
[in,out] | tm | The Matrix to mirror |
axis | The world plane to mirror around. The axis will be reflected against the plane formed by the point (0, 0, 0) and the normal where normal[axis] = 1; | |
scaleMatrix | The matrix can be mirrored either by pure rotation, or by pure scaling. If true, the matrix is mirrored by flipping one of its axis, changing the handedness of the matrix. This had the advantage that the mirroring will be passed onto all it's children. This is preferential when the system can handle it, but can cause issues in systems that do not compensate for scale, eg game pipelines and skinning. if false, the mirroring will be achieved using rotation only and will not affect child local positions. It is better to use non-scaling mirroring when dealing with tools or processes that do not well support scale, or when the matrix will be blended with non-scaled matrices. (eg, Point/Quat based pipelines and skinning) |
Same as Maxtrix3::operator[].
Perform matrix multiplication without additional matrix copy
outMatrix | The result of matrixA * matrixB |
matrixA | First matrix to multiply |
matrixB | Second matrix to multiply |