Initial commit: Final state of the master project
This commit is contained in:
35
Research/scene/PoolBuilder/StandardPoolBuilder.h
Normal file
35
Research/scene/PoolBuilder/StandardPoolBuilder.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include "BaseTreePoolBuilder.h"
|
||||
|
||||
class StandardPoolBuilder : public BaseTreePoolBuilder
|
||||
{
|
||||
|
||||
public:
|
||||
using BaseTreePoolBuilder::BaseTreePoolBuilder;
|
||||
virtual ~StandardPoolBuilder() override {}
|
||||
|
||||
std::string GetFullFileName(const std::string& fileName) const override;
|
||||
std::vector<unsigned8> GetPointerSizesPerLevel(const BaseTree* tree) const;
|
||||
protected:
|
||||
void InitBuild(const BaseTree* tree) override;
|
||||
void FinishBuild(const BaseTree* tree) override;
|
||||
bool WordAligned() const override { return false; }
|
||||
|
||||
unsigned8 GetBytesPerPointer(const BaseTree* tree, const unsigned32& nodeId) const override;
|
||||
std::vector<unsigned8> WrapPointer(const BaseTree* root, const unsigned32& nodeIndex, const unsigned32& indexInPool, const unsigned32& pointer) const override;
|
||||
|
||||
size_t GetPoolInfoSize(const BaseTree* tree) const override;
|
||||
std::vector<unsigned8> GetPoolInfo(const BaseTree* tree, const std::vector<size_t>& nodePointers, const std::vector<unsigned32>& nodeOrder) override;
|
||||
|
||||
//void StandardPoolBuilder::OrderNodes(const BaseTree* tree, std::vector<unsigned32>& nodeOrder) const override;
|
||||
|
||||
void CalculatePointerSizesPerLevel(const BaseTree* tree);
|
||||
void ClearVariables();
|
||||
// Variables used during the current build
|
||||
bool mIsBuildingTree = false;
|
||||
std::vector<unsigned8> mPointerSizesPerLevel;
|
||||
std::vector<unsigned32> mLevelOffsets;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user