Class for working with matrix 3 x 3. Подробнее...
Открытые типы | |
typedef comms::cMat3 | mat3_t |
Открытые члены | |
Mat3 () | |
Constructor for building a zero matrix. | |
operator Mat4 () const | |
Ability for converting Mat3 to Mat4 . Подробнее... | |
operator Quat () const | |
Ability for converting Mat3 to Quat . Подробнее... | |
operator std::string () const | |
Ability for converting Mat3 to string . Подробнее... | |
bool | operator== (const Mat3 &b) const |
Comparison. Подробнее... | |
bool | identity () const |
Returns TRUE when the matrix is identity. | |
bool | orthonormalized () const |
Returns TRUE when the matrix is ortonormal. | |
bool | symmetric () const |
Returns TRUE when the matrix is symmetric. | |
bool | zero () const |
Returns TRUE when all values of the matrix are zero. | |
Mat3 & | operator() (int row, int col, float v) |
Setter like array. Подробнее... | |
float | operator() (int row, int col) const |
Getter like array. Подробнее... | |
Mat3 | operator- () const |
Negation operator. Подробнее... | |
Mat3 & | operator+= (const Mat3 &b) |
Mat3 & | operator-= (const Mat3 &b) |
Mat3 & | operator*= (const Mat3 &b) |
Mat3 & | operator*= (const float &k) |
Mat3 & | operator/= (const float &k) |
Mat3 | operator+ (const Mat3 &b) const |
Mat3 | operator- (const Mat3 &b) const |
Mat3 | operator* (const Mat3 &b) const |
Mat3 | operator* (const float &k) const |
Mat3 | operator/ (const float &k) const |
float | determinant () const |
Returns determinant of the matrix. Подробнее... | |
float | trace () const |
Returns trace of the matrix. Подробнее... | |
Mat3 & | invert () |
Invert the matrix. Подробнее... | |
Mat3 | invertCopy () const |
Mat3 & | orthonormalize () |
Orthonormalize the matrix. Подробнее... | |
Mat3 | orthonormalizeCopy () const |
Mat3 & | transpose () |
Transpose the matrix. Подробнее... | |
Mat3 | transposeCopy () const |
Статические открытые данные | |
static const Mat3 | IDENTITY |
static const Mat3 | ZERO |
Class for working with matrix 3 x 3.
# This class is a standard for declaration of new classes.
Mat3 a(
1, 0, 0,
0, 2, 0,
0, 0, 6 );
Mat3 b = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
Mat3 a( 0 );
// equivalent to
Mat3 b( 0, 0, 0, 0, 0, 0, 0, 0, 0 );
// equivalent to
Mat3 c = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
coat::scripto::Mat3::operator Mat4 | ( | ) | const |
coat::scripto::Mat3::operator Quat | ( | ) | const |
coat::scripto::Mat3::operator std::string | ( | ) | const |
Ability for converting Mat3
to string
.
Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
auto m = string( a );
|
inline |
Comparison.
Mat3 a;
...
if (a == Mat3( 1 )) { ... }
|
inline |
Setter like array.
Mat3 a( 0 );
// setting a value 9.5 to row 3 and col 2
a[ 3, 2, 9.5 ];
|
inline |
Getter like array.
Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
float v00 = a[ 0, 0 ];
float v12 = a[ 1, 2 ];
|
inline |
Negation operator.
Mat3 a( 1 );
Mat3 na = -a;
|
inline |
Returns determinant of the matrix.
Mat3 a( 1 );
float r = a.determinant();
|
inline |
Returns trace of the matrix.
Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
float r = a.trace();
|
inline |
Invert the matrix.
Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
a.invert();
|
inline |
Orthonormalize the matrix.
Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
a.orthonormalize();
|
inline |
|
inline |
Transpose the matrix.
Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
a.transpose();
|
inline |