Класс сцены
This commit is contained in:
32
include/Scene.h
Normal file
32
include/Scene.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef SCENE_H
|
||||
#define SCENE_H
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "Model.h"
|
||||
|
||||
// Класс сцены
|
||||
class Scene
|
||||
{
|
||||
public:
|
||||
Scene(); // Конструктор пустой сцены
|
||||
Scene(const Scene ©); // Конструктор копирования
|
||||
Scene& operator=(const Scene& other); // Оператор присваивания
|
||||
|
||||
void render(); // Рендер сцены
|
||||
|
||||
Node root; // Корневой узел
|
||||
|
||||
// Списки объектов, выступающих узлами
|
||||
std::list<Node> nodes; // Список пустых узлов
|
||||
std::list<Model> models; // Список моделей для рендера
|
||||
|
||||
protected:
|
||||
void rebuld_tree(const Scene& from); // Перестройка дерева после копирования или присваивания
|
||||
template <class T>
|
||||
void rebuild_Nodes_list(T& nodes, const Scene& from); // Перестройка узлов выбранного списка
|
||||
template <class T>
|
||||
void move_parent(Node& for_node, const std::list<T>& from_nodes, std::list<T>& this_nodes); // Сдвигает родителя узла между двумя списками при условии его принадлежности к оригинальному
|
||||
};
|
||||
|
||||
#endif // SCENE_H
|
||||
Reference in New Issue
Block a user