#pragma once #include #include #include #include "BiomGenerator.h" #include "Chunk.h" #include "CaveGenerator.h" class DimensionGenerator : public virtual Framework::ReferenceCounter { private: Framework::RCArray biomGenerators; Framework::Array biomDistribution; const int dimensionId; Framework::Vec3 minTemplateAffectedPosition; Framework::Vec3 maxTemplateAffectedPosition; CaveGenerator* caveGenerator; BiomGenerator* zBiomGenerator(int x, int y); protected: int seed; DimensionGenerator(int dimensionId, CaveGenerator* caveGenerator); ~DimensionGenerator(); void registerBiom(BiomGenerator* generator, double possibility); Framework::RCArray* getGeneratedStructoresForArea(Framework::Vec3 minPos, Framework::Vec3 maxPos); public: void initialize(int seed); Chunk* generateChunk(int centerX, int centerY); Framework::Either generateBlock(Framework::Vec3 location); bool spawnStructure(Framework::Vec3 location, std::function filter); int getDimensionId() const; virtual Noise* zBiomNoise() = 0; virtual Noise* zStructureNoise() = 0; };