#pragma once #include "BaseStandardOctreeBuilder.h" #include "../../scene/Octree/Tree.h" class StandardOctreeBuilder : public BaseStandardOctreeBuilder { public: StandardOctreeBuilder(); ~StandardOctreeBuilder() override; std::string GetTreeType() override; protected: void InitTree() override {} // Finalize the tree void FinalizeTree() override; // Step to finalize the main tree (for example storing it to a file) void TerminateTree() override; // Cancel the cur pass tree if there's already a cache file available for it bool CancelCurPassTree(const glm::uvec3& coord) override; // Initialize the tree for the current pass. void InitCurPassTree(glm::uvec3 coord) override; // Terminate the tree in the current pass. This means it should also be appended to the main tree and deleted void FinalizeCurPassTree(glm::uvec3 coord) override; // Should add a node to the current pass tree at the given coordinate and color void AddNode(const glm::uvec3& coordinate) override; std::vector GetOctreeNodesPerLevel() override; std::vector GetNodesPerLevel() override; private: std::string GetSinglePassTreeFilename(const glm::uvec3& coord) const; Tree<>* mTree; };