/
polytech_kolomna
/
polygon2d
Обзор
Документация
Войти
/
polytech_kolomna
/
polygon2d
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
math
AIPackaging_Math/include/Line2D.h
32 строки
754 B
ecomaks2017
added mathlib folder
15 окт 2025, 13:57
15 окт 2025, 13:57
18b6bb3
Код
Авторство
О чём код?
#ifndef LINE2D_H #define LINE2D_H #include <ICurve2D.h> #include <Vector2D.h> #include <Point2D.h> // Линия в 2D пространстве class AIPACKAGING_MATHLIB_API Line2D : public ICurve2D { public: Line2D(const Point2D& point, const Vector2D& direction); // Возвращает точку на линии Point2D getPoint(double t) const override; void move(const Vector2D& offset) override; void scale(double scaleX, double scaleY) override; void rotate(double radian) override; // Выполняет трансформацию линии void transform(const Matrix3& transform) override; bool operator==(const Line2D& other); bool operator!=(const Line2D& other); private: Point2D point_; Vector2D direction_; }; #endif