24 lines
949 B
C++
24 lines
949 B
C++
#pragma once
|
|
#include "BaseOctreeBuilder.h"
|
|
#include "../../inc/glm/glm.hpp"
|
|
#include "../Voxelizer/VoxelInfo.h"
|
|
|
|
class BaseStandardOctreeBuilder : public BaseOctreeBuilder
|
|
{
|
|
public:
|
|
|
|
bool RequiresColors() const override { return false; }
|
|
bool RequiresNormals() const override { return false; }
|
|
bool RequiresReflectivity() const override { return false; }
|
|
protected:
|
|
virtual void PreProcessNode(const glm::uvec3& coordinate) {}
|
|
void PreProcessNode(const VoxelInfo& voxel) override { PreProcessNode(voxel.position); }
|
|
|
|
// Should add a node to the current pass tree at the given coordinate and color
|
|
virtual void AddNode(const glm::uvec3& coordinate) = 0;
|
|
void AddNode(const VoxelInfo& voxel) override { AddNode(voxel.position); }
|
|
virtual void AddMissingNode(const glm::uvec3& coordinate) { printf("Warning: Missing nodes not caught!"); }
|
|
void AddMissingNode(const VoxelInfo& voxel) override { AddMissingNode(voxel.position); }
|
|
private:
|
|
};
|