BiomGenerator.h 842 B

12345678910111213141516171819202122232425262728293031323334
  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> generateSurfaceBlock(
  17. int x, int y, int z)
  18. = 0;
  19. virtual Framework::Either<Block*, int> generateBelowSurfaceBlock(
  20. int x, int y, int z)
  21. = 0;
  22. virtual Framework::Either<Block*, int> generateCaveBlock(
  23. int x, int y, int z)
  24. = 0;
  25. virtual void setSeed(int seed);
  26. virtual Noise* zHeightMapNoise() = 0;
  27. const Framework::RCArray<GenerationTemplate>& getTemplates();
  28. };