GenerationTemplate.h 911 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <ReferenceCounter.h>
  3. #include <Vec3.h>
  4. #include "GeneratedStructure.h"
  5. #include "Noise.h"
  6. class GenerationTemplate : public Framework::ReferenceCounter
  7. {
  8. private:
  9. float propability;
  10. int minSurfaceDist;
  11. int maxSurfaceDist;
  12. Framework::Vec3<int> minPosOffset;
  13. Framework::Vec3<int> maxSize;
  14. public:
  15. GenerationTemplate(float propability, int minSurfaceDist, int maxSurfaceDist, Framework::Vec3<int> minPosOffset, Framework::Vec3<int> maxSize);
  16. virtual bool canEffect(Framework::Vec3<int> location, Framework::Vec3<int> affectedLocation) const;
  17. virtual bool isGenerationPossable(Framework::Vec3<int> location, int distToSurface) const;
  18. virtual GeneratedStructure* generateAt(Framework::Vec3<int> location, Noise* zNoise, int dimensionId) = 0;
  19. float getPropability() const;
  20. Framework::Vec3<int> getMinAffectedOffset() const;
  21. Framework::Vec3<int> getMaxAffectedOffset() const;
  22. };