summaryrefslogtreecommitdiff
path: root/source/modules/asura-utils/math/matrix44.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-utils/math/matrix44.h')
-rw-r--r--source/modules/asura-utils/math/matrix44.h77
1 files changed, 3 insertions, 74 deletions
diff --git a/source/modules/asura-utils/math/matrix44.h b/source/modules/asura-utils/math/matrix44.h
index c0cea92..fa5be33 100644
--- a/source/modules/asura-utils/math/matrix44.h
+++ b/source/modules/asura-utils/math/matrix44.h
@@ -10,119 +10,48 @@ namespace AsuraEngine
/// ҪתõOpenGLglm::mat4
/// https://blog.csdn.net/candycat1992/article/details/8830894
///
-
class Matrix44
{
public:
static const Matrix44 Identity;
- ///
- /// Creates a new identity matrix.
- ///
Matrix44();
- ///
- /// Copy constructor.
- ///
Matrix44(const Matrix44& m);
- ///
- /// Destructor.
- ///
~Matrix44();
void operator = (const Matrix44& m);
void SetOrtho(float _left, float _right, float _bottom, float _top, float _near, float _far);
- ///
- /// Multiplies this Matrix44 with another Matrix44, changing neither.
- /// @param m The Matrix44 to multiply with this Matrix44.
- /// @return The combined matrix.
- ///
Matrix44 operator * (const Matrix44 & m) const;
- ///
- /// Multiplies a Matrix44 into this Matrix44.
- /// @param m The Matrix44 to combine into this Matrix44.
- ///
void operator *= (const Matrix44 & m);
- ///
- /// Gets a pointer to the 16 array elements.
- /// @return The array elements.
- ///
const float* GetElements() const;
- ///
- /// ReSets this Matrix44 to the identity matrix.
- ///
void SetIdentity();
- ///
- /// ReSets this Matrix44 to a translation.
- /// @param x Translation along x-axis.
- /// @param y Translation along y-axis.
- ///
void SetTranslation(float x, float y);
- ///
- /// ReSets this Matrix44 to a rotation.
- /// @param r The angle in radians.
- ///
void SetRotation(float r);
- ///
- /// ReSets this Matrix44 to a scale transformation.
- /// @param sx Scale factor along the x-axis.
- /// @param sy Scale factor along the y-axis.
- ///
void SetScale(float sx, float sy);
- ///
- /// ReSets this Matrix44 to a shear transformation.
- /// @param kx Shear along x-axis.
- /// @param ky Shear along y-axis.
- ///
void SetShear(float kx, float ky);
- ///
- /// Creates a transformation with a certain position, orientation, scale
- /// and offSet. Perfect for Drawables -- what a coincidence!
- ///
- /// @param x The translation along the x-axis.
- /// @param y The translation along the y-axis.
- /// @param angle The rotation (rad) around the center with offSet (ox,oy).
- /// @param sx Scale along x-axis.
- /// @param sy Scale along y-axis.
- /// @param ox The offSet for rotation along the x-axis.
- /// @param oy The offSet for rotation along the y-axis.
- /// @param kx Shear along x-axis
- /// @param ky Shear along y-axis
- ///
void SetTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy);
- ///
- /// Multiplies this Matrix44 with a translation.
- /// @param x Translation along x-axis.
- /// @param y Translation along y-axis.
- ///
void Translate(float x, float y);
- ///
- /// Multiplies this Matrix44 with a rotation.
- /// @param r Angle in radians.
- ///
void Rotate(float r);
- ///
- /// Multiplies this Matrix44 with a scale transformation.
- /// @param sx Scale factor along the x-axis.
- /// @param sy Scale factor along the y-axis.
- ///
void Scale(float sx, float sy);
+ void Transform(float x, float y, float angle, float sx, float sy, float ox, float oy);
+
///
/// Multiplies this Matrix44 with a shear transformation.
/// @param kx Shear along the x-axis.
@@ -157,4 +86,4 @@ namespace AsuraEngine
namespace AEMath = AsuraEngine::Math;
-#endif \ No newline at end of file
+#endif \ No newline at end of file