/
polytech_kolomna
/
polygon2d
Обзор
Документация
Войти
/
polytech_kolomna
/
polygon2d
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
math
AIPackaging_Math/include/Matrix3.h
35 строк
923 B
ecomaks2017
added mathlib folder
15 окт 2025, 13:57
15 окт 2025, 13:57
18b6bb3
Код
Авторство
О чём код?
#ifndef MATRIX3_H #define MATRIX3_H #include <AIPackagingMathExport.h> #include <Point2D.h> #include <Vector2D.h> // Матрица 3x3 struct AIPACKAGING_MATHLIB_API Matrix3 { Matrix3(double m11 = 1.0, double m12 = 0, double m13 = 0, double m21 = 0, double m22 = 1.0, double m23 = 0, double m31 = 0, double m32 = 0, double m33 = 1.0); static Matrix3 translation(const Vector2D& offset); static Matrix3 scale(double scaleX, double scaleY); static Matrix3 rotation(double radian); Matrix3 operator*(const Matrix3& matrix) const; Matrix3 operator*(double scalar) const; Matrix3& operator*=(double scalar); friend AIPACKAGING_MATHLIB_API Point2D operator*(const Point2D& point, const Matrix3& matrix); friend AIPACKAGING_MATHLIB_API Vector2D operator*(const Vector2D& vector, const Matrix3& matrix); public: double m11_, m12_, m13_, m21_, m22_, m23_, m31_, m32_, m33_; }; #endif