12345678910111213141516171819202122232425262728293031323334353637 |
- #pragma once
- #include <Array.h>
- #include <ReferenceCounter.h>
- #include <Either.h>
- #include "BiomGenerator.h"
- #include "Chunk.h"
- #include "CaveGenerator.h"
- class DimensionGenerator : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::RCArray<BiomGenerator> biomGenerators;
- Framework::Array<double> biomDistribution;
- const int dimensionId;
- Framework::Vec3<int> minTemplateAffectedPosition;
- Framework::Vec3<int> 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<GeneratedStructure>* getGeneratedStructoresForArea(Framework::Vec3<int> minPos, Framework::Vec3<int> maxPos);
- public:
- void initialize(int seed);
- Chunk* generateChunk(int centerX, int centerY);
- Framework::Either<Block*, int> generateBlock(Framework::Vec3<int> location);
- int getDimensionId() const;
- virtual Noise* zBiomNoise() = 0;
- virtual Noise* zStructureNoise() = 0;
- };
|