#include "GeneratorTemplate.h" GeneratorTemplate::GeneratorTemplate(float propability, Framework::Vec3 minPosOffset, Framework::Vec3 maxSize) : ReferenceCounter(), propability(propability), minPosOffset(minPosOffset), maxSize(maxSize) {} bool GeneratorTemplate::canEffect( Framework::Vec3 location, Framework::Vec3 affectedLocation) const { Framework::Vec3 localPos = affectedLocation - (location + minPosOffset); return localPos.x >= 0 && localPos.y >= 0 && localPos.z >= 0 && localPos.x < maxSize.x && localPos.y < maxSize.y && localPos.z < maxSize.z; } float GeneratorTemplate::getPropability() const { return propability; } Framework::Vec3 GeneratorTemplate::getMinAffectedOffset() const { return minPosOffset; } Framework::Vec3 GeneratorTemplate::getMaxAffectedOffset() const { return minPosOffset + maxSize; } GeneratorTemplateFactory::GeneratorTemplateFactory() : ReferenceCounter() {}