AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
Matrix2x3.hpp
1/*
2Copyright (C) 2019,2024-2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_MATRIX2X3_H
17#define AEONGUI_MATRIX2X3_H
18#include <array>
19#include <cstdint>
20#include <cstddef>
21#include <string>
22#include "aeongui/Platform.hpp"
23namespace AeonGUI
24{
25 class Vector2;
37 {
38 public:
40 DLL Matrix2x3();
49 DLL Matrix2x3 (
50 double xx, double yx,
51 double xy, double yy,
52 double x0, double y0
53 );
57 DLL Matrix2x3 ( const std::array<const double, 6> aMatrixArray );
61 DLL Matrix2x3 ( double aRotation );
65 DLL Matrix2x3 ( const Vector2& aScale );
70 DLL Matrix2x3 ( const Vector2& aScale, double aRotation );
76 DLL Matrix2x3 ( const Vector2& aScale, double aRotation, const Vector2& aTranslation );
81 DLL Matrix2x3& operator*= ( const Matrix2x3& aRight );
86 DLL const double& operator[] ( size_t aIndex ) const;
87 private:
88 double mMatrix2x3[6];
89 };
90
94 const Matrix2x3 Abs ( const Matrix2x3& aMatrix2x3 );
99 DLL Matrix2x3 ParseSVGTransform ( const std::string& value );
100}
101#endif
Platform-specific DLL import/export macros and compiler helpers.
2x3 affine transformation matrix.
Definition Matrix2x3.hpp:37
Matrix2x3()
Default constructor. Initializes to the identity matrix.
Definition Matrix2x3.cpp:25
const double & operator[](size_t aIndex) const
Access a matrix element by index.
Definition Matrix2x3.cpp:87
Matrix2x3 & operator*=(const Matrix2x3 &aRight)
Multiply this matrix by another (post-multiply).
Definition Matrix2x3.cpp:74
2D vector of doubles.
Definition Vector2.hpp:31