/
nikitadikan
/
Raycaster
Обзор
Документация
Войти
/
nikitadikan
/
Raycaster
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
controller.h
41 строка
787 B
Никита Дикан
add all files
17 май 2025, 00:21
17 май 2025, 00:21
e1b827d
Код
Авторство
О чём код?
#ifndef CONTROLLER_H #define CONTROLLER_H #include "ray.h" #include "polygon.h" #include <QColor> class Controller { public: Controller() = default; Controller(const QPointF source, QColor color); Controller(const QPointF source, int width, int height); std::vector<Polygon>& GetPolygons(); void AddPolygon(Polygon& new_polygon); void AddVertexToLastPolygon(const QPointF& new_vertex); void SetSource(const QPointF source); void SetSize(int width, int height); QPointF GetSource() const; std::vector<Ray> CastRays(); void IntersectRays(std::vector<Ray>& rays); Polygon CreateLightArea(); QColor GetColor(); private: QPointF light_source; std::vector<Polygon> polygons; QColor color; }; #endif // CONTROLLER_H