Initial commit: Final state of the master project
This commit is contained in:
40
Research/core/OctreeBuilder/MultiRootOctreeBuilder.h
Normal file
40
Research/core/OctreeBuilder/MultiRootOctreeBuilder.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#include "BaseMaterialOctreeBuilder.h"
|
||||
#include "../../scene/Octree/MultiRootTree.h"
|
||||
|
||||
class MultiRootOctreeBuilder : public BaseMaterialOctreeBuilder<Color>
|
||||
{
|
||||
public:
|
||||
MultiRootOctreeBuilder();
|
||||
MultiRootOctreeBuilder(unsigned8 bitsPerChannel);
|
||||
~MultiRootOctreeBuilder() override;
|
||||
|
||||
std::string GetTreeType() override;
|
||||
protected:
|
||||
// Initialize the main tree
|
||||
void InitTree() override;
|
||||
void FinalizeTree() override;
|
||||
// Step to finalize the main tree (for example storing it to a file)
|
||||
void TerminateTree() 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;
|
||||
|
||||
void AddMissingNode(const glm::uvec3& coordinate, const Color& color) override;
|
||||
// Should add a node to the current pass tree at the given coordinate and color
|
||||
void AddNode(const glm::uvec3& coordinate, const Color& color) override;
|
||||
|
||||
std::vector<size_t> GetOctreeNodesPerLevel() override;
|
||||
std::vector<size_t> GetNodesPerLevel() override;
|
||||
private:
|
||||
void UpdateMultiRoot(glm::uvec3 coordinate, glm::u8 color, unsigned32 slaveRootOffset);
|
||||
|
||||
MultiRootTree<>* mTree;
|
||||
|
||||
MultiRootTree<>* mCurPassTree;
|
||||
|
||||
unsigned8 mBitsPerChannel;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user