3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
cMat4 Class Reference

The 4D-matrix, refer it as coat::mat4 in the Core API. More...

#include <cMat4.h>

Public Types

enum  EZeroCtor { ZeroCtor }
 
enum  EIdentityCtor { IdentityCtor }
 
enum  ERowsCtor { RowsCtor }
 
enum  EColsCtor { ColsCtor }
 

Public Member Functions

 cMat4 (const EZeroCtor)
 
 cMat4 (const EIdentityCtor)
 
 cMat4 (const ERowsCtor, const cVec4 &Row0, const cVec4 &Row1, const cVec4 &Row2, const cVec4 &Row3)
 
 cMat4 (const EColsCtor, const cVec4 &Col0, const cVec4 &Col1, const cVec4 &Col2, const cVec4 &Col3)
 
 cMat4 (const cMat3 &Rotation, const cVec3 &Translation)
 
 cMat4 (const cVec3 &Scaling, const cVec3 &Translation)
 
 cMat4 (const float _00, const float _01, const float _02, const float _03, const float _10, const float _11, const float _12, const float _13, const float _20, const float _21, const float _22, const float _23, const float _30, const float _31, const float _32, const float _33)
 
 cMat4 (const cMat4 &v)
 
void Copy (const float *Float16)
 
void CopyTransposed (const float *Float16)
 
void SetZero ()
 
void SetIdentity ()
 
const cVec4GetRow (const int Index) const
 
const cVec4GetRow0 () const
 
const cVec4GetRow1 () const
 
const cVec4GetRow2 () const
 
const cVec4GetRow3 () const
 
cVec4Row (const int Index)
 
cVec4Row0 ()
 
cVec4Row1 ()
 
cVec4Row2 ()
 
cVec4Row3 ()
 
void SetRow (const int Index, const cVec4 &)
 
void SetRow0 (const cVec4 &)
 
void SetRow1 (const cVec4 &)
 
void SetRow2 (const cVec4 &)
 
void SetRow3 (const cVec4 &)
 
void SetRow (const int Index, const float X, const float Y, const float Z, const float W)
 
void SetRow0 (const float X, const float Y, const float Z, const float W)
 
void SetRow1 (const float X, const float Y, const float Z, const float W)
 
void SetRow2 (const float X, const float Y, const float Z, const float W)
 
void SetRow3 (const float X, const float Y, const float Z, const float W)
 
const cVec4 GetCol (const int Index) const
 
const cVec4 GetCol0 () const
 
const cVec4 GetCol1 () const
 
const cVec4 GetCol2 () const
 
const cVec4 GetCol3 () const
 
void SetCol (const int Index, const cVec4 &)
 
void SetCol0 (const cVec4 &)
 
void SetCol1 (const cVec4 &)
 
void SetCol2 (const cVec4 &)
 
void SetCol3 (const cVec4 &)
 
void SetCol (const int Index, const float X, const float Y, const float Z, const float W)
 
void SetCol0 (const float X, const float Y, const float Z, const float W)
 
void SetCol1 (const float X, const float Y, const float Z, const float W)
 
void SetCol2 (const float X, const float Y, const float Z, const float W)
 
void SetCol3 (const float X, const float Y, const float Z, const float W)
 
void SetElem (int Row, int Col, float Value)
 
float GetElem (const int Row, const int Col) const
 
float & Elem (const int Row, const int Col)
 
const cVec4operator[] (const int Row) const
 
cVec4operator[] (const int Row)
 
float operator() (const int Row, const int Col) const
 
float & operator() (const int Row, const int Col)
 
float Trace () const
 
float Determinant () const
 
bool operator== (const cMat4 &) const
 
bool IsZero (float Eps=cMath::MatrixEpsilon) const
 
bool IsIdentity (float Eps=cMath::MatrixEpsilon) const
 
bool IsSymmetric (float Eps=cMath::MatrixEpsilon) const
 
bool IsOrthonormal (float Eps=cMath::MatrixEpsilon) const
 
const cMat4 operator- () const
 
cMat4operator+= (const cMat4 &R)
 
cMat4operator-= (const cMat4 &R)
 
cMat4operator*= (const cMat4 &R)
 
cMat4operator*= (const float)
 
cMat4operator/= (const float)
 
const cMat4 operator+ (const cMat4 &R) const
 
const cMat4 operator- (const cMat4 &R) const
 
const cMat4 operator* (const cMat4 &R) const
 
const cMat4 operator* (const float) const
 
const cMat4 operator/ (const float) const
 
void Add (const cMat4 &R)
 
void Sub (const cMat4 &R)
 
void Mul (const cMat4 &R)
 
void Mul (const float s)
 
const float * ToFloatPtr () const
 
float * ToFloatPtr ()
 
const cStr ToString (const int Prec=2) const
 
const cMat3 ToMat3 () const
 
const cMat3 ToNormalMatrix () const
 
const cQuat ToQuat () const
 
const cVec3 GetTranslation () const
 
void SetTranslation (const cVec3 &)
 
const cVec3 GetScaling () const
 
void SetScaling (const cVec3 &)
 
cAngles GetRotation () const
 
void SetRotation (const cAngles &)
 
void Transpose ()
 
bool Invert ()
 
std::tuple< float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float > __getstate__ ()
 
void __setstate__ (const std::tuple< float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float > &state)
 
const std::string __repr__ () const
 

Static Public Member Functions

static bool Equals (const cMat4 &, const cMat4 &, const float Eps=cMath::MatrixEpsilon)
 
static const cMat4 Add (const cMat4 &L, const cMat4 &R)
 
static const cMat4 Sub (const cMat4 &L, const cMat4 &R)
 
static const cMat4 Mul (const cMat4 &L, const cMat4 &R)
 
static const cMat4 Mul (const cMat4 &L, const float s)
 
static const cMat4 Transpose (const cMat4 &)
 
static bool Invert (const cMat4 &Fm, cMat4 *To)
 
static const cMat4 Translation (const float X, const float Y)
 
static const cMat4 Translation (const float X, const float Y, const float Z)
 
static const cMat4 Translation (const cVec2 &XY)
 
static const cMat4 Translation (const cVec3 &XYZ)
 
static const cMat4 Rotation (const cVec3 &Axis, const float Angle)
 
static const cMat4 RotationX (const float Angle)
 
static const cMat4 RotationY (const float Angle)
 
static const cMat4 RotationZ (const float Angle)
 
static const cMat4 RotationXYZ (const float Pitch, const float Yaw, const float Roll)
 
static const cMat4 EulerZYX (const float eulerX, const float eulerY, const float eulerZ)
 
static const cMat4 RotationAt (const cVec2 &Orig, const float Angle)
 
static const cMat4 RotationAt (const cVec3 &Orig, const cVec3 &Axis, const float Angle)
 
static const cMat4 Scaling (const float XYZ)
 
static const cMat4 Scaling (const float X, const float Y)
 
static const cMat4 Scaling (const float X, const float Y, const float Z)
 
static const cMat4 Scaling (const cVec2 &XY)
 
static const cMat4 Scaling (const cVec3 &XYZ)
 
static const cMat4 ScalingAt (const float OrigX, const float OrigY, const float ScaleXY)
 
static const cMat4 ScalingAt (const float OrigX, const float OrigY, const float ScaleX, const float ScaleY)
 
static const cMat4 ScalingAt (const cVec2 &Orig, const float ScaleXY)
 
static const cMat4 ScalingAt (const cVec2 &Orig, const float ScaleX, const float ScaleY)
 
static const cMat4 ScalingAt (const cVec2 &Orig, const cVec2 &Scale)
 
static const cMat4 ScalingAt (const cVec3 &Orig, const float ScaleXYZ)
 
static const cMat4 ScalingAt (const cVec3 &Orig, const float ScaleX, const float ScaleY, const float ScaleZ)
 
static const cMat4 ScalingAt (const cVec3 &Orig, const cVec3 &Scale)
 
static const cMat4 ScalingAt (const cVec3 &Orig, const cVec3 &Dir, float Scale)
 
static const cMat4 Perspective (float YFov, float AspectWtoH, float Znear, float Zfar)
 
static const cMat4 PerspectiveInf (const float YFov, const float AspectWtoH, const float Znear)
 
static const cMat4 Ortho (const float Width, const float Height, const float Znear, const float Zfar)
 
static const cMat4 Ortho (const float Left, const float Right, const float Bottom, const float Top, const float Znear, const float Zfar)
 
static const cMat4 Ortho (const cBounds &B)
 
static const cMat4 CubeViewProjection (const cVec3 &Pos, const int Side, const float Radius, const bool GL)
 
static const cMat4 LookAtViewProjection (const cVec3 &LookFrom, const cVec3 &LookAt, const float FovY, const float AspectYtoH, const float Znear, const float Zfar)
 

Static Public Attributes

static const cMat4 Zero
 
static const cMat4 Identity
 

Friends

const cMat4 operator* (const float, const cMat4 &)
 

Detailed Description

The 4D-matrix, refer it as coat::mat4 in the Core API.


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