Files
CDAG/Research/core/OctreeBuilder/OctreeBuilder.h

47 lines
1.5 KiB
C++

#pragma once
#include "../Defines.h"
#include "OctreeBuilderStatistics.h"
#include "BaseOctreeBuilder.h"
#include "../../scene/Material/MaterialQuantizer/ColorAndValueQuantizer.h"
//#include "../../scene/Material/MaterialQuantizer/BaseQuantizer.h"
//#include "../../scene/Material/SmallNormal.h"
class Root;
class BaseColorQuantizer;
class SmallNormal;
struct NormalCompare;
class TriangleMeshVoxelizer;
class PVMVoxelizer;
// Singleton wrapper that reads the settings and creates the correct octreebuilder
class OctreeBuilder
{
friend BaseOctreeBuilder;
public:
static void Create();
static void SetTreeType(std::string type);
static std::string GetTreeType();
static void Destroy();
static OctreeBuilderStatistics BuildOctree();
static OctreeBuilderStatistics BuildOctree(unsigned8 depth);
static OctreeBuilderStatistics BuildOctree(unsigned8 depth, std::string sceneFile, std::string dagFile);
static BaseOctreeBuilder* Instance();
private:
static BaseOctreeBuilder* mInstance;
static BaseQuantizer<Color, ColorCompare>* mColorQuantizer;
static BaseQuantizer<SmallNormal, NormalCompare>* mNormalQuantizer;
static BaseQuantizer<ColorAndNormal, ColorAndNormalCompare>* mColorAndNormalQuantizer;
static BaseQuantizer<ColorAndOpacity, ColorAndOpacityCompare>* mColorAndOpacityQuantizer;
static BaseQuantizer<ColorAndNormalAndValue, ColorAndNormalAndValueCompare>* mColorAndNormalAndValueQuantizer;
static void Create(std::string type);
static std::string mTreeType;
OctreeBuilder();
~OctreeBuilder();
};