BiomGenerator.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include <Either.h>
  3. #include <ReferenceCounter.h>
  4. #include "GenerationTemplate.h"
  5. class Block;
  6. class Noise;
  7. class BiomGenerator : public virtual Framework::ReferenceCounter
  8. {
  9. private:
  10. Framework::RCArray<GenerationTemplate> templates;
  11. protected:
  12. int seed;
  13. void addTemplateGenerator(GenerationTemplate* gTemplate);
  14. public:
  15. BiomGenerator();
  16. virtual Framework::Either<Block*, int> generateAboveSurfaceBlock(
  17. int x, int y, int z, int surfaceHeight, Chunk* partialGeneratedChunk)
  18. = 0;
  19. virtual Framework::Either<Block*, int> generateSurfaceBlock(
  20. int x, int y, int z)
  21. = 0;
  22. virtual Framework::Either<Block*, int> generateBelowSurfaceBlock(
  23. int x, int y, int z)
  24. = 0;
  25. virtual Framework::Either<Block*, int> generateCaveBlock(
  26. int x, int y, int z)
  27. = 0;
  28. virtual Framework::Either<Block*, int> generateUnderWaterBlock(
  29. int x, int y, int z, int surfaceHeight, Chunk* partialGeneratedChunk)
  30. = 0;
  31. virtual void setSeed(int seed);
  32. virtual Noise* zHeightMapNoise() = 0;
  33. const Framework::RCArray<GenerationTemplate>& getTemplates();
  34. };