This is a 3-by-3 transform matrix. It typically will represent either a rotation-and-scale (no translation) matrix in 3-d, or a full affine matrix (rotation, scale, translation) in 2-d, e.g. for a texture matrix.
More...
|
| __init__ () |
|
| __init__ (const LMatrix3f other) |
|
| __init__ (float e00, float e01, float e02, float e10, float e11, float e12, float e20, float e21, float e22) |
|
object | __reduce__ () |
|
str | __repr__ () |
|
size_t | addHash (size_t hash) |
| Adds the vector into the running hash. More...
|
|
size_t | addHash (size_t hash, float threshold) |
| Adds the vector into the running hash. More...
|
|
bool | almostEqual (const LMatrix3f other) |
| Returns true if two matrices are memberwise equal within a default tolerance based on the numeric type. More...
|
|
bool | almostEqual (const LMatrix3f other, float threshold) |
| Returns true if two matrices are memberwise equal within a specified tolerance. More...
|
|
int | compareTo (const LMatrix3f other) |
| This flavor of compare_to uses a default threshold value based on the numeric type. More...
|
|
int | compareTo (const LMatrix3f other, float threshold) |
| Sorts matrices lexicographically, componentwise. Returns a number less than 0 if this matrix sorts before the other one, greater than zero if it sorts after, 0 if they are equivalent (within the indicated tolerance). More...
|
|
| componentwiseMult (const LMatrix3f other) |
|
float | determinant () |
| Returns the determinant of the matrix. More...
|
|
| fill (float fill_value) |
| Sets each element of the matrix to the indicated fill_value. This is of questionable value, but is sometimes useful when initializing to zero. More...
|
|
| generateHash (ChecksumHashGenerator hashgen) |
| Adds the vector to the indicated hash generator. More...
|
|
| generateHash (ChecksumHashGenerator hashgen, float threshold) |
| Adds the vector to the indicated hash generator. More...
|
|
float | getCell (int row, int col) |
| Returns a particular element of the matrix. More...
|
|
LVecBase3f | getCol (int col) |
| Returns the indicated column of the matrix as a three-component vector. More...
|
|
LVecBase2f | getCol2 (int col) |
| Returns the indicated column of the matrix as a two-component vector, ignoring the last row. More...
|
|
list | getCol2s () |
|
list | getCols () |
|
| getData () |
| Returns the address of the first of the nine data elements in the matrix. The remaining elements occupy the next eight positions in row-major order. More...
|
|
size_t | getHash () |
| Returns a suitable hash for phash_map. More...
|
|
size_t | getHash (float threshold) |
| Returns a suitable hash for phash_map. More...
|
|
int | getNumComponents () |
| Returns the number of elements in the matrix, nine. More...
|
|
| getRow (LVecBase3f result_vec, int row) |
| Stores the indicated row of the matrix as a three-component vector. More...
|
|
LVecBase3f | getRow (int row) |
| Returns the indicated row of the matrix as a three-component vector. More...
|
|
LVecBase2f | getRow2 (int row) |
| Returns the indicated row of the matrix as a two-component vector, ignoring the last column. More...
|
|
list | getRow2s () |
|
list | getRows () |
|
bool | invertFrom (const LMatrix3f other) |
| Computes the inverse of the other matrix, and stores the result in this matrix. This is a fully general operation and makes no assumptions about the type of transform represented by the matrix. More...
|
|
bool | invertInPlace () |
| Inverts the current matrix. Returns true if the inverse is successful, false if the matrix was singular. More...
|
|
bool | invertTransposeFrom (const LMatrix3f other) |
| Simultaneously computes the inverse of the indicated matrix, and then the transpose of that inverse. More...
|
|
bool | invertTransposeFrom (const LMatrix4f other) |
| Simultaneously computes the inverse of the indicated matrix, and then the transpose of that inverse. More...
|
|
bool | isIdentity () |
| Returns true if this is (close enough to) the identity matrix, false otherwise. More...
|
|
bool | isNan () |
| Returns true if any component of the matrix is not-a-number, false otherwise. More...
|
|
| multiply (const LMatrix3f other1, const LMatrix3f other2) |
| this = other1 * other2 More...
|
|
| operator new (size_t size) |
|
bool | operator!= (const LMatrix3f other) |
|
| operator() (int row, int col) |
|
float | operator() (int row, int col) |
|
LMatrix3f | operator* (const LMatrix3f other) |
|
LMatrix3f | operator* (float scalar) |
|
LMatrix3f | operator*= (const LMatrix3f other) |
|
LMatrix3f | operator*= (float scalar) |
| Performs a memberwise scale. More...
|
|
LMatrix3f | operator+= (const LMatrix3f other) |
| Performs a memberwise addition between two matrices. More...
|
|
LMatrix3f | operator-= (const LMatrix3f other) |
| Performs a memberwise subtraction between two matrices. More...
|
|
LMatrix3f | operator/ (float scalar) |
|
LMatrix3f | operator/= (float scalar) |
| Performs a memberwise scale. More...
|
|
bool | operator< (const LMatrix3f other) |
|
LMatrix3f | operator= (const LMatrix3f other) |
|
LMatrix3f | operator= (float fill_value) |
|
bool | operator== (const LMatrix3f other) |
|
LMatrix3f::Row | operator[] (int i) |
|
LMatrix3f::CRow | operator[] (int i) |
|
| output (Ostream out) |
|
| readDatagram (DatagramIterator source) |
| Reads the matrix from the Datagram using get_stdfloat(). More...
|
|
| readDatagramFixed (DatagramIterator scan) |
| Reads the matrix from the Datagram using get_float32() or get_float64(). See write_datagram_fixed(). More...
|
|
| set (float e00, float e01, float e02, float e10, float e11, float e12, float e20, float e21, float e22) |
|
| setCell (int row, int col, float value) |
| Changes a particular element of the matrix. More...
|
|
| setCol (int col, const LVecBase2f v) |
| Replaces the indicated column of the matrix from a two-component vector, ignoring the last row. More...
|
|
| setCol (int col, const LVecBase3f v) |
| Replaces the indicated column of the matrix from a three-component vector. More...
|
|
| setRotateMat (float angle) |
| Fills mat with a matrix that rotates by the given angle in degrees counterclockwise. More...
|
|
| setRotateMat (float angle, const LVecBase3f axis, CoordinateSystem cs) |
| Fills mat with a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. More...
|
|
| setRotateMatNormaxis (float angle, const LVecBase3f axis, CoordinateSystem cs) |
| Fills mat with a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. Assumes axis has been normalized. More...
|
|
| setRow (int row, const LVecBase2f v) |
| Replaces the indicated row of the matrix from a two-component vector, ignoring the last column. More...
|
|
| setRow (int row, const LVecBase3f v) |
| Replaces the indicated row of the matrix from a three-component vector. More...
|
|
| setScaleMat (const LVecBase2f scale) |
| Fills mat with a matrix that applies the indicated scale in each of the two axes. More...
|
|
| setScaleMat (const LVecBase3f scale) |
| Fills mat with a matrix that applies the indicated scale in each of the three axes. More...
|
|
| setScaleShearMat (const LVecBase3f scale, const LVecBase3f shear, CoordinateSystem cs) |
| Fills mat with a matrix that applies the indicated scale and shear. More...
|
|
| setShearMat (const LVecBase3f shear, CoordinateSystem cs) |
| Fills mat with a matrix that applies the indicated shear in each of the three planes. More...
|
|
| setTranslateMat (const LVecBase2f trans) |
| Fills mat with a matrix that applies the indicated translation. More...
|
|
| transposeFrom (const LMatrix3f other) |
|
| transposeInPlace () |
|
| write (Ostream out, int indent_level) |
|
| writeDatagram (Datagram destination) |
| Writes the matrix to the Datagram using add_stdfloat(). This is appropriate when you want to write the matrix using the standard width setting, especially when you are writing a bam file. More...
|
|
| writeDatagramFixed (Datagram destination) |
| Writes the matrix to the Datagram using add_float32() or add_float64(), depending on the type of floats in the matrix, regardless of the setting of Datagram::set_stdfloat_double(). This is appropriate when you want to write a fixed-width value to the datagram, especially when you are not writing a bam file. More...
|
|
LVecBase3f | xform (const LVecBase3f v) |
| 3-component vector or point times matrix. More...
|
|
| xformInPlace (LVecBase3f v) |
| 3-component vector or point times matrix. More...
|
|
LVecBase2f | xformPoint (const LVecBase2f v) |
| The matrix transforms a 2-component point (including translation component) and returns the result. This assumes the matrix is an affine transform. More...
|
|
| xformPointInPlace (LVecBase2f v) |
| The matrix transforms a 2-component point (including translation component). This assumes the matrix is an affine transform. More...
|
|
LVecBase2f | xformVec (const LVecBase2f v) |
| The matrix transforms a 2-component vector (without translation component) and returns the result. This assumes the matrix is an affine transform. More...
|
|
LVecBase3f | xformVec (const LVecBase3f v) |
| The matrix transforms a 3-component vector and returns the result. This assumes the matrix is an orthonormal transform. More...
|
|
LVecBase3f | xformVecGeneral (const LVecBase3f v) |
| The matrix transforms a 3-component vector (without translation component) and returns the result, as a fully general operation. More...
|
|
| xformVecGeneralInPlace (LVecBase3f v) |
| The matrix transforms a 3-component vector (without translation component), as a fully general operation. More...
|
|
| xformVecInPlace (LVecBase2f v) |
| The matrix transforms a 2-component vector (without translation component). This assumes the matrix is an affine transform. More...
|
|
| xformVecInPlace (LVecBase3f v) |
| The matrix transforms a 3-component vector. This assumes the matrix is an orthonormal transform. More...
|
|
|
static const LMatrix3f | convertMat (CoordinateSystem from, CoordinateSystem to) |
| Returns a matrix that transforms from the indicated coordinate system to the indicated coordinate system. More...
|
|
static TypeHandle | getClassType () |
|
static const LMatrix3f | identMat () |
| Returns an identity matrix. More...
|
|
static LMatrix3f | rotateMat (float angle) |
| Returns a matrix that rotates by the given angle in degrees counterclockwise. More...
|
|
static LMatrix3f | rotateMat (float angle, const LVecBase3f axis, CoordinateSystem cs) |
| Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. More...
|
|
static LMatrix3f | rotateMatNormaxis (float angle, const LVecBase3f axis, CoordinateSystem cs) |
| Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. Assumes axis has been normalized. More...
|
|
static LMatrix3f | scaleMat (const LVecBase2f scale) |
| Returns a matrix that applies the indicated scale in each of the two axes. More...
|
|
static LMatrix3f | scaleMat (const LVecBase3f scale) |
| Returns a matrix that applies the indicated scale in each of the three axes. More...
|
|
static LMatrix3f | scaleMat (float sx, float sy) |
| Returns a matrix that applies the indicated scale in each of the two axes. More...
|
|
static LMatrix3f | scaleMat (float sx, float sy, float sz) |
| Returns a matrix that applies the indicated scale in each of the three axes. More...
|
|
static LMatrix3f | scaleShearMat (const LVecBase3f scale, const LVecBase3f shear, CoordinateSystem cs) |
| Returns a matrix that applies the indicated scale and shear. More...
|
|
static LMatrix3f | scaleShearMat (float sx, float sy, float sz, float shxy, float shxz, float shyz, CoordinateSystem cs) |
| Returns a matrix that applies the indicated scale and shear. More...
|
|
static LMatrix3f | shearMat (const LVecBase3f shear, CoordinateSystem cs) |
| Returns a matrix that applies the indicated shear in each of the three planes. More...
|
|
static LMatrix3f | shearMat (float shxy, float shxz, float shyz, CoordinateSystem cs) |
| Returns a matrix that applies the indicated shear in each of the three planes. More...
|
|
static int | size () |
| Returns 3: the number of rows of a LMatrix3. More...
|
|
static LMatrix3f | translateMat (const LVecBase2f trans) |
| Returns a matrix that applies the indicated translation. More...
|
|
static LMatrix3f | translateMat (float tx, float ty) |
| Returns a matrix that applies the indicated translation. More...
|
|
This is a 3-by-3 transform matrix. It typically will represent either a rotation-and-scale (no translation) matrix in 3-d, or a full affine matrix (rotation, scale, translation) in 2-d, e.g. for a texture matrix.