Сцена и функция-загрузчик
This commit is contained in:
@@ -19,32 +19,36 @@ class Scene loadGLTFtoScene(std::string filename);
|
||||
// Класс сцены
|
||||
class Scene
|
||||
{
|
||||
public:
|
||||
Scene(); // Конструктор пустой сцены
|
||||
Scene(const Scene ©); // Конструктор копирования
|
||||
Scene& operator=(const Scene& other); // Оператор присваивания
|
||||
public:
|
||||
Scene(); // Конструктор пустой сцены
|
||||
Scene(const Scene ©); // Конструктор копирования
|
||||
Scene& operator=(const Scene& other); // Оператор присваивания
|
||||
|
||||
void render(ShaderProgram &shaderProgram, UBO &material_buffer, bool recalc_animations = false); // Рендер сцены
|
||||
void render(ShaderProgram &shaderProgram, UBO &material_buffer, UBO *bones_buffer = NULL, bool recalc_animations = false); // Рендер сцены
|
||||
|
||||
void set_group_id(GLuint64 id, GLuint etc = 0); // Изменение флага записи идентификатора для всех моделей
|
||||
void set_group_id(GLuint64 id, GLuint etc = 0); // Изменение флага записи идентификатора для всех моделей
|
||||
|
||||
Node root; // Корневой узел
|
||||
Node root; // Корневой узел
|
||||
|
||||
// Списки объектов, выступающих узлами
|
||||
std::list<Node> nodes; // Список пустых узлов
|
||||
std::list<Model> models; // Список моделей для рендера
|
||||
std::list<Camera> cameras; // Список камер
|
||||
// Списки объектов, выступающих узлами
|
||||
std::list<Node> nodes; // Список пустых узлов
|
||||
std::list<Model> models; // Список моделей для рендера
|
||||
std::list<Camera> cameras; // Список камер
|
||||
|
||||
std::vector<Animation> animations; // Список анимаций
|
||||
std::map<std::string, size_t> animation_names; // Имя анимации - индекс
|
||||
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); // Сдвигает родителя узла между двумя списками при условии его принадлежности к оригинальному
|
||||
template <class T>
|
||||
void move_animation_target(Node*& target, const std::list<T>& from_nodes, std::list<T>& this_nodes); // Перестройка узлов анимации
|
||||
std::list<Bone> bones; // Узлы, выступающие в роли костей
|
||||
std::list<Skeleton> skeletons; // Скелеты
|
||||
|
||||
std::vector<Animation> animations; // Список анимаций
|
||||
std::map<std::string, size_t> animation_names; // Имя анимации - индекс
|
||||
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); // Сдвигает родителя узла между двумя списками при условии его принадлежности к оригинальному
|
||||
template <class T>
|
||||
void move_animation_target(Node*& target, const std::list<T>& from_nodes, std::list<T>& this_nodes); // Перестройка узлов анимации
|
||||
void rebuld_bones(const Scene &from); // Перестройка указателей на кости и узлы, которые выступают в роли костей
|
||||
};
|
||||
|
||||
#endif // SCENE_H
|
||||
|
||||
Reference in New Issue
Block a user