Initial commit: Final state of the master project

This commit is contained in:
2017-09-16 09:41:37 +02:00
commit 696180d43b
832 changed files with 169717 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#pragma once
#include "BaseMaterialOctreeBuilder.h"
#include "../../scene/Octree/MaterialTree.h"
#include "../Comparers.h"
#include "../../scene/Material/BitsMaterial.h"
#include "../../scene/Material/Color.h"
class RandomOctreeBuilder : public BaseMaterialOctreeBuilder<Color>
{
public:
RandomOctreeBuilder();
~RandomOctreeBuilder() 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;
// 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:
MaterialTree<BitsMaterial<1>, HashComparer<BitsMaterial<1>>>* mTree;
MaterialTree<Color, ColorCompare>* mCurPassTree;
glm::uvec3 mCurPassTreeCoord;
};