3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
coat::scripto::Mat3 Class Reference

Class for working with matrix 3 x 3. More...

#include <SMat3.h>

Public Member Functions

 Mat3 ()
 Constructor for building a zero matrix. More...
 
 operator Mat4 () const
 Ability for converting Mat3 to Mat4. More...
 
 operator Quat () const
 Ability for converting Mat3 to Quat. More...
 
 operator std::string () const
 Ability for converting Mat3 to string. More...
 
bool operator== (const Mat3 &b) const
 Comparison. More...
 
bool identity () const
 Returns TRUE when the matrix is identity. More...
 
bool orthonormalized () const
 Returns TRUE when the matrix is ortonormal. More...
 
bool symmetric () const
 Returns TRUE when the matrix is symmetric. More...
 
bool zero () const
 Returns TRUE when all values of the matrix are zero. More...
 
Mat3operator() (int row, int col, float v)
 Setter like array. More...
 
float operator() (int row, int col) const
 Getter like array. More...
 
Mat3 operator- () const
 Negation operator. More...
 
float determinant () const
 Returns determinant of the matrix. More...
 
float trace () const
 Returns trace of the matrix. More...
 
Mat3invert ()
 Invert the matrix. More...
 
Mat3 invertCopy () const
 
Mat3orthonormalize ()
 Orthonormalize the matrix. More...
 
Mat3 orthonormalizeCopy () const
 
Mat3transpose ()
 Transpose the matrix. More...
 
Mat3 transposeCopy () const
 

Detailed Description

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 };
See Also
Mat4
mat3.jpg
Since
4.5.32

Constructor & Destructor Documentation

coat::scripto::Mat3::Mat3 ( )
inline

Constructor for building a zero matrix.

Referenced by operator-().

Member Function Documentation

float coat::scripto::Mat3::determinant ( ) const
inline

Returns determinant of the matrix.

Mat3 a( 1 );
float r = a.determinant();
bool coat::scripto::Mat3::identity ( ) const
inline

Returns TRUE when the matrix is identity.

Mat3& coat::scripto::Mat3::invert ( )
inline

Invert the matrix.

Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
a.invert();
Mat3 coat::scripto::Mat3::invertCopy ( ) const
inline
See Also
invert()
coat::scripto::Mat3::operator Mat4 ( ) const

Ability for converting Mat3 to Mat4.

Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
auto m = Mat4( a );
coat::scripto::Mat3::operator Quat ( ) const

Ability for converting Mat3 to Quat.

Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
auto m = Quat( a );
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 );
Mat3& coat::scripto::Mat3::operator() ( int  row,
int  col,
float  v 
)
inline

Setter like array.

Mat3 a( 0 );
// setting a value 9.5 to row 3 and col 2
a[ 3, 2, 9.5 ];
float coat::scripto::Mat3::operator() ( int  row,
int  col 
) const
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 ];
Mat3 coat::scripto::Mat3::operator- ( ) const
inline

Negation operator.

Mat3 a( 1 );
Mat3 na = -a;

References Mat3().

bool coat::scripto::Mat3::operator== ( const Mat3 b) const
inline

Comparison.

Mat3 a;
...
if (a == Mat3( 1 )) { ... }
Mat3& coat::scripto::Mat3::orthonormalize ( )
inline

Orthonormalize the matrix.

Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
a.orthonormalize();
Mat3 coat::scripto::Mat3::orthonormalizeCopy ( ) const
inline
bool coat::scripto::Mat3::orthonormalized ( ) const
inline

Returns TRUE when the matrix is ortonormal.

bool coat::scripto::Mat3::symmetric ( ) const
inline

Returns TRUE when the matrix is symmetric.

float coat::scripto::Mat3::trace ( ) const
inline

Returns trace of the matrix.

Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
float r = a.trace();
Mat3& coat::scripto::Mat3::transpose ( )
inline

Transpose the matrix.

Mat3 a = {
1, 0, 0,
0, 2, 0,
0, 0, 6 };
a.transpose();
Mat3 coat::scripto::Mat3::transposeCopy ( ) const
inline
See Also
transpose()
bool coat::scripto::Mat3::zero ( ) const
inline

Returns TRUE when all values of the matrix are zero.


The documentation for this class was generated from the following files: