|
@@ -14,8 +14,8 @@ class Mat3
|
|
|
public:
|
|
public:
|
|
|
/// @name Accessors
|
|
/// @name Accessors
|
|
|
/// @{
|
|
/// @{
|
|
|
- float& operator ()(const uint i, const uint j);
|
|
|
|
|
- const float& operator ()(const uint i, const uint j) const;
|
|
|
|
|
|
|
+ float& operator()(const uint i, const uint j);
|
|
|
|
|
+ const float& operator()(const uint i, const uint j) const;
|
|
|
float& operator [](const uint i);
|
|
float& operator [](const uint i);
|
|
|
const float& operator [](const uint i) const;
|
|
const float& operator [](const uint i) const;
|
|
|
/// @}
|
|
/// @}
|
|
@@ -34,13 +34,13 @@ class Mat3
|
|
|
|
|
|
|
|
/// @name Operators with Mat3
|
|
/// @name Operators with Mat3
|
|
|
/// @{
|
|
/// @{
|
|
|
- Mat3 operator +(const Mat3& b) const;
|
|
|
|
|
|
|
+ Mat3 operator +(const Mat3& b) const;
|
|
|
Mat3& operator +=(const Mat3& b);
|
|
Mat3& operator +=(const Mat3& b);
|
|
|
- Mat3 operator -(const Mat3& b) const;
|
|
|
|
|
|
|
+ Mat3 operator -(const Mat3& b) const;
|
|
|
Mat3& operator -=(const Mat3& b);
|
|
Mat3& operator -=(const Mat3& b);
|
|
|
- Mat3 operator *(const Mat3& b) const; ///< 27 muls, 18 adds
|
|
|
|
|
|
|
+ Mat3 operator *(const Mat3& b) const; ///< 27 muls, 18 adds
|
|
|
Mat3& operator *=(const Mat3& b);
|
|
Mat3& operator *=(const Mat3& b);
|
|
|
- Mat3 operator /(const Mat3& b) const;
|
|
|
|
|
|
|
+ Mat3 operator /(const Mat3& b) const;
|
|
|
Mat3& operator /=(const Mat3& b);
|
|
Mat3& operator /=(const Mat3& b);
|
|
|
bool operator ==(const Mat3& b) const;
|
|
bool operator ==(const Mat3& b) const;
|
|
|
bool operator !=(const Mat3& b) const;
|
|
bool operator !=(const Mat3& b) const;
|
|
@@ -48,51 +48,51 @@ class Mat3
|
|
|
|
|
|
|
|
/// @name Operators with float
|
|
/// @name Operators with float
|
|
|
/// @{
|
|
/// @{
|
|
|
- Mat3 operator + (float f) const;
|
|
|
|
|
|
|
+ Mat3 operator +(float f) const;
|
|
|
Mat3& operator +=(float f);
|
|
Mat3& operator +=(float f);
|
|
|
- Mat3 operator - (float f) const;
|
|
|
|
|
|
|
+ Mat3 operator -(float f) const;
|
|
|
Mat3& operator -=(float f);
|
|
Mat3& operator -=(float f);
|
|
|
- Mat3 operator * (float f) const;
|
|
|
|
|
|
|
+ Mat3 operator *(float f) const;
|
|
|
Mat3& operator *=(float f);
|
|
Mat3& operator *=(float f);
|
|
|
- Mat3 operator / (float f) const;
|
|
|
|
|
|
|
+ Mat3 operator /(float f) const;
|
|
|
Mat3& operator /=(float f);
|
|
Mat3& operator /=(float f);
|
|
|
/// @}
|
|
/// @}
|
|
|
|
|
|
|
|
/// @name Operators with others
|
|
/// @name Operators with others
|
|
|
/// @{
|
|
/// @{
|
|
|
- Vec3 operator * (const Vec3& b) const; ///< 9 muls, 6 adds
|
|
|
|
|
|
|
+ Vec3 operator *(const Vec3& b) const; ///< 9 muls, 6 adds
|
|
|
/// @}
|
|
/// @}
|
|
|
|
|
|
|
|
/// @name Other
|
|
/// @name Other
|
|
|
/// @{
|
|
/// @{
|
|
|
- void setRows(const Vec3& a, const Vec3& b, const Vec3& c);
|
|
|
|
|
- void setRow(const uint i, const Vec3& v);
|
|
|
|
|
- void getRows(Vec3& a, Vec3& b, Vec3& c) const;
|
|
|
|
|
- Vec3 getRow(const uint i) const;
|
|
|
|
|
- void setColumns(const Vec3& a, const Vec3& b, const Vec3& c);
|
|
|
|
|
- void setColumn(const uint i, const Vec3& v);
|
|
|
|
|
- void getColumns(Vec3& a, Vec3& b, Vec3& c) const;
|
|
|
|
|
- Vec3 getColumn(const uint i) const;
|
|
|
|
|
- Vec3 getXAxis() const;
|
|
|
|
|
- Vec3 getYAxis() const;
|
|
|
|
|
- Vec3 getZAxis() const;
|
|
|
|
|
- void setXAxis(const Vec3& v3);
|
|
|
|
|
- void setYAxis(const Vec3& v3);
|
|
|
|
|
- void setZAxis(const Vec3& v3);
|
|
|
|
|
- void setRotationX(float rad);
|
|
|
|
|
- void setRotationY(float rad);
|
|
|
|
|
- void setRotationZ(float rad);
|
|
|
|
|
- void rotateXAxis(float rad); ///< It rotates "this" in the axis defined by the rotation AND not the world axis
|
|
|
|
|
- void rotateYAxis(float rad);
|
|
|
|
|
- void rotateZAxis(float rad);
|
|
|
|
|
- void transpose();
|
|
|
|
|
- Mat3 getTransposed() const;
|
|
|
|
|
- void reorthogonalize();
|
|
|
|
|
- void print() const;
|
|
|
|
|
|
|
+ void setRows(const Vec3& a, const Vec3& b, const Vec3& c);
|
|
|
|
|
+ void setRow(const uint i, const Vec3& v);
|
|
|
|
|
+ void getRows(Vec3& a, Vec3& b, Vec3& c) const;
|
|
|
|
|
+ Vec3 getRow(const uint i) const;
|
|
|
|
|
+ void setColumns(const Vec3& a, const Vec3& b, const Vec3& c);
|
|
|
|
|
+ void setColumn(const uint i, const Vec3& v);
|
|
|
|
|
+ void getColumns(Vec3& a, Vec3& b, Vec3& c) const;
|
|
|
|
|
+ Vec3 getColumn(const uint i) const;
|
|
|
|
|
+ Vec3 getXAxis() const;
|
|
|
|
|
+ Vec3 getYAxis() const;
|
|
|
|
|
+ Vec3 getZAxis() const;
|
|
|
|
|
+ void setXAxis(const Vec3& v3);
|
|
|
|
|
+ void setYAxis(const Vec3& v3);
|
|
|
|
|
+ void setZAxis(const Vec3& v3);
|
|
|
|
|
+ void setRotationX(float rad);
|
|
|
|
|
+ void setRotationY(float rad);
|
|
|
|
|
+ void setRotationZ(float rad);
|
|
|
|
|
+ void rotateXAxis(float rad); ///< It rotates "this" in the axis defined by the rotation AND not the world axis
|
|
|
|
|
+ void rotateYAxis(float rad);
|
|
|
|
|
+ void rotateZAxis(float rad);
|
|
|
|
|
+ void transpose();
|
|
|
|
|
+ Mat3 getTransposed() const;
|
|
|
|
|
+ void reorthogonalize();
|
|
|
|
|
+ void print() const;
|
|
|
float getDet() const;
|
|
float getDet() const;
|
|
|
- void invert();
|
|
|
|
|
- Mat3 getInverse() const;
|
|
|
|
|
- void setIdentity();
|
|
|
|
|
|
|
+ void invert();
|
|
|
|
|
+ Mat3 getInverse() const;
|
|
|
|
|
+ void setIdentity();
|
|
|
static const Mat3& getZero();
|
|
static const Mat3& getZero();
|
|
|
static const Mat3& getIdentity();
|
|
static const Mat3& getIdentity();
|
|
|
/// @}
|
|
/// @}
|