/
polytech_kolomna
/
aipackaging_math
Обзор
Документация
Войти
/
polytech_kolomna
/
aipackaging_math
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
1
CI/CD
Аналитика
intersections
include/matrix3.h
35 строк
919 B
Olegh
lower case
28 окт 2025, 21:08
28 окт 2025, 21:08
037a99f
Код
Авторство
О чём код?
#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 translate(const Vector2D& offset); static Matrix3 scale(double scaleX, double scaleY); static Matrix3 rotate(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