LightsprintSDK 2021.08.08
rr::RRMatrix3x4Ex Struct Reference

#include <RRMath.h>

Inheritance diagram for rr::RRMatrix3x4Ex:
rr::RRMatrix3x4

Public Member Functions

 RRMatrix3x4Ex ()
 
 RRMatrix3x4Ex (const RRMatrix3x4 &a)
 
void updateInverse ()
 
void transformNormal (RRVec3 &a) const
 
RRVec3 getTransformedNormal (const RRVec3 &a) const
 
void transformPlane (RRVec4 &a) const
 
RRVec4 getTransformedPlane (const RRVec4 &a) const
 
- Public Member Functions inherited from rr::RRMatrix3x4
 RRMatrix3x4 ()
 
 RRMatrix3x4 (const float *m3x4, bool transposed)
 
 RRMatrix3x4 (const double *m3x4, bool transposed)
 
 RRMatrix3x4 (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23)
 
 RRMatrix3x4 (double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23)
 
void transformPosition (RRVec3 &a) const
 
RRVec3 getTransformedPosition (const RRVec3 &a) const
 
void transformDirection (RRVec3 &a) const
 
RRVec3 getTransformedDirection (const RRVec3 &a) const
 
bool operator== (const RRMatrix3x4 &a) const
 
bool operator!= (const RRMatrix3x4 &a) const
 
RRMatrix3x4 operator* (const RRMatrix3x4 &a) const
 
RRMatrix3x4operator*= (const RRMatrix3x4 &a)
 
bool isIdentity () const
 
RRVec3 getTranslation () const
 
void setTranslation (const RRVec3 &a)
 
void postTranslate (const RRVec3 &a)
 
RRMatrix3x4 centeredAround (const RRVec3 &center) const
 
RRVec3 getScale () const
 
void preScale (const RRVec3 &a)
 
RRVec3 getYawPitchRoll () const
 
RRVec4 getAxisAngle () const
 
RRVec4 getQuaternion () const
 
RRVec3 getColumn (unsigned i) const
 
RRVec4 getRow (unsigned i) const
 
void setColumn (unsigned i, const RRVec3 &column)
 
void setRow (unsigned i, const RRVec4 &row)
 
RRReal determinant3x3 () const
 
bool invertedTo (RRMatrix3x4 &destination) const
 
void blendLinear (const RRMatrix3x4 &sample0, const RRMatrix3x4 &sample1, RRReal blend)
 
void blendAkima (unsigned numSamples, const RRMatrix3x4 **samples, const RRReal *times, RRReal time)
 

Public Attributes

RRMatrix3x4 inverse
 
RRReal scaleSign
 
- Public Attributes inherited from rr::RRMatrix3x4
RRReal m [3][4]
 

Additional Inherited Members

- Static Public Member Functions inherited from rr::RRMatrix3x4
static RRMatrix3x4 identity ()
 
static RRMatrix3x4 scale (const RRVec3 &scale)
 
static RRMatrix3x4 translation (const RRVec3 &translation)
 
static RRMatrix3x4 rotationByYawPitchRoll (const RRVec3 &yawPitchRollRad)
 
static RRMatrix3x4 rotationByAxisAngle (const RRVec3 &rotationAxis, RRReal rotationAngleRad)
 
static RRMatrix3x4 rotationByQuaternion (const RRVec4 &quaternion)
 
static RRMatrix3x4 mirror (const RRVec4 &plane)
 

Detailed Description

Extended RRMatrix3x4, has built-in inverse matrix and several functions that use it.

Constructor & Destructor Documentation

◆ RRMatrix3x4Ex() [1/2]

rr::RRMatrix3x4Ex::RRMatrix3x4Ex ( )
inline

◆ RRMatrix3x4Ex() [2/2]

rr::RRMatrix3x4Ex::RRMatrix3x4Ex ( const RRMatrix3x4 a)
explicit

Member Function Documentation

◆ updateInverse()

void rr::RRMatrix3x4Ex::updateInverse ( )

Updates inverse and scaleSign from m. To be called each time you modify matrix.

◆ transformNormal()

void rr::RRMatrix3x4Ex::transformNormal ( RRVec3 a) const

Transforms normal in 3d space. Result is not normalized.

Unlike transformDirection(), transformNormal() ensures that normals perpendicular to surface stay perpendicular even for matrices with non-uniform scale.

◆ getTransformedNormal()

RRVec3 rr::RRMatrix3x4Ex::getTransformedNormal ( const RRVec3 a) const

Returns normal transformed in 3d space. Result is not normalized.

Unlike getTransformedDirection(), getTransformedNormal() ensures that normals perpendicular to surface stay perpendicular even for matrices with non-uniform scale.

◆ transformPlane()

void rr::RRMatrix3x4Ex::transformPlane ( RRVec4 a) const

Transforms plane in 3d space.

◆ getTransformedPlane()

RRVec4 rr::RRMatrix3x4Ex::getTransformedPlane ( const RRVec4 a) const

Returns plane transformed in 3d space.

Member Data Documentation

◆ inverse

RRMatrix3x4 rr::RRMatrix3x4Ex::inverse

Inverse matrix.

◆ scaleSign

RRReal rr::RRMatrix3x4Ex::scaleSign

-1 if scale is negative, 1 if positive.