Matrix3x4.pkg 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. $#include "Matrix3x4.h"
  2. class Matrix3x4
  3. {
  4. Matrix3x4();
  5. Matrix3x4(const Matrix3x4& matrix);
  6. Matrix3x4(const Matrix3& matrix);
  7. Matrix3x4(const Matrix4& matrix);
  8. Matrix3x4(float v00, float v01, float v02, float v03,
  9. float v10, float v11, float v12, float v13,
  10. float v20, float v21, float v22, float v23);
  11. Matrix3x4(const Vector3& translation, const Quaternion& rotation, float scale);
  12. Matrix3x4(const Vector3& translation, const Quaternion& rotation, const Vector3& scale);
  13. bool operator == (const Matrix3x4& rhs) const;
  14. Vector3 operator * (const Vector3& rhs) const;
  15. Vector3 operator * (const Vector4& rhs) const;
  16. Matrix3x4 operator + (const Matrix3x4& rhs) const;
  17. Matrix3x4 operator - (const Matrix3x4& rhs) const;
  18. Matrix3x4 operator * (float rhs) const;
  19. Matrix3x4 operator * (const Matrix3x4& rhs) const;
  20. Matrix4 operator * (const Matrix4& rhs) const;
  21. void SetTranslation(const Vector3& translation);
  22. void SetRotation(const Matrix3& rotation);
  23. void SetScale(const Vector3& scale);
  24. void SetScale(float scale);
  25. Matrix3 ToMatrix3() const;
  26. Matrix4 ToMatrix4() const;
  27. Matrix3 RotationMatrix() const;
  28. Vector3 Translation() const;
  29. Quaternion Rotation() const;
  30. Vector3 Scale() const;
  31. bool Equals(const Matrix3x4& rhs) const;
  32. void Decompose(Vector3& translation, Quaternion& rotation, Vector3& scale) const;
  33. Matrix3x4 Inverse() const;
  34. float m00_ @ m00;
  35. float m01_ @ m01;
  36. float m02_ @ m02;
  37. float m03_ @ m03;
  38. float m10_ @ m10;
  39. float m11_ @ m11;
  40. float m12_ @ m12;
  41. float m13_ @ m13;
  42. float m20_ @ m20;
  43. float m21_ @ m21;
  44. float m22_ @ m22;
  45. float m23_ @ m23;
  46. static const Matrix3x4 ZERO;
  47. static const Matrix3x4 IDENTITY;
  48. };