12345678910111213141516171819202122232425262728293031323334353637383940 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include "GeneratedStructure.h"
- #include "Noise.h"
- class GeneratorTemplate : public Framework::ReferenceCounter
- {
- private:
- float propability;
- Framework::Vec3<int> minPosOffset;
- Framework::Vec3<int> maxSize;
- public:
- GeneratorTemplate(float propability,
- Framework::Vec3<int> minPosOffset,
- Framework::Vec3<int> maxSize);
- virtual bool canEffect(Framework::Vec3<int> location,
- Framework::Vec3<int> affectedLocation) const;
- virtual GeneratedStructure* generateAt(
- Framework::Vec3<int> location, Noise* zNoise, int dimensionId)
- = 0;
- float getPropability() const;
- Framework::Vec3<int> getMinAffectedOffset() const;
- Framework::Vec3<int> getMaxAffectedOffset() const;
- };
- class GeneratorTemplateFactory : public Framework::ReferenceCounter
- {
- public:
- GeneratorTemplateFactory();
- virtual GeneratorTemplate* createTemplate(
- Framework::JSON::JSONValue* zConfig)
- = 0;
- virtual Framework::JSON::Validator::JSONValidator* getValidator() = 0;
- };
|