Matrix3x4.pkg 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. ~Matrix3x4();
  14. bool operator == (const Matrix3x4& rhs) const;
  15. Vector3 operator * (const Vector3& rhs) const;
  16. Vector3 operator * (const Vector4& rhs) const;
  17. Matrix3x4 operator + (const Matrix3x4& rhs) const;
  18. Matrix3x4 operator - (const Matrix3x4& rhs) const;
  19. Matrix3x4 operator * (float rhs) const;
  20. Matrix3x4 operator * (const Matrix3x4& rhs) const;
  21. Matrix4 operator * (const Matrix4& rhs) const;
  22. void SetTranslation(const Vector3& translation);
  23. void SetRotation(const Matrix3& rotation);
  24. void SetScale(const Vector3& scale);
  25. void SetScale(float scale);
  26. Matrix3 ToMatrix3() const;
  27. Matrix4 ToMatrix4() const;
  28. Matrix3 RotationMatrix() const;
  29. Vector3 Translation() const;
  30. Quaternion Rotation() const;
  31. Vector3 Scale() const;
  32. bool Equals(const Matrix3x4& rhs) const;
  33. void Decompose(Vector3& translation, Quaternion& rotation, Vector3& scale) const;
  34. Matrix3x4 Inverse() const;
  35. String ToString() const;
  36. float m00_ @ m00;
  37. float m01_ @ m01;
  38. float m02_ @ m02;
  39. float m03_ @ m03;
  40. float m10_ @ m10;
  41. float m11_ @ m11;
  42. float m12_ @ m12;
  43. float m13_ @ m13;
  44. float m20_ @ m20;
  45. float m21_ @ m21;
  46. float m22_ @ m22;
  47. float m23_ @ m23;
  48. static const Matrix3x4 ZERO;
  49. static const Matrix3x4 IDENTITY;
  50. };