123456789101112131415161718192021222324252627282930313233 |
- #pragma once
- #include <Array.h>
- #include <ReferenceCounter.h>
- #include <Either.h>
- #include "BiomGenerator.h"
- #include "Chunk.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;
- BiomGenerator* zBiomGenerator(int seed, int x, int y);
- protected:
- DimensionGenerator(int dimensionId);
- ~DimensionGenerator();
- void registerBiom(BiomGenerator* generator, double possibility);
- Framework::RCArray<GeneratedStructure>* getGeneratedStructoresForArea(int seed, Framework::Vec3<int> minPos, Framework::Vec3<int> maxPos);
- public:
- Chunk* generateChunk(int seed, int centerX, int centerY);
- Framework::Either<Block*, int> generateBlock(int seed, Framework::Vec3<int> location);
- int getDimensionId() const;
- virtual Noise* zBiomNoise(int seed) = 0;
- virtual Noise* zStructureNoise(int seed) = 0;
- };
|