GenerationTemplate.h 1013 B

123456789101112131415161718192021222324252627282930313233343536
  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,
  16. int minSurfaceDist,
  17. int maxSurfaceDist,
  18. Framework::Vec3<int> minPosOffset,
  19. Framework::Vec3<int> maxSize);
  20. virtual bool canEffect(Framework::Vec3<int> location,
  21. Framework::Vec3<int> affectedLocation) const;
  22. virtual bool isGenerationPossable(
  23. Framework::Vec3<int> location, int distToSurface) const;
  24. virtual GeneratedStructure* generateAt(
  25. Framework::Vec3<int> location, Noise* zNoise, int dimensionId)
  26. = 0;
  27. float getPropability() const;
  28. Framework::Vec3<int> getMinAffectedOffset() const;
  29. Framework::Vec3<int> getMaxAffectedOffset() const;
  30. };