123456789101112131415161718192021222324252627282930 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include <Either.h>
- #include "Block.h"
- class GenerationTemplate;
- class GeneratedStructure : public Framework::ReferenceCounter
- {
- private:
- int* blockIds;
- Block** blocks;
- Framework::Vec3<int> size;
- Framework::Vec3<int> minAffectedPos;
- Framework::Vec3<int> originPos;
- GenerationTemplate* t;
- public:
- GeneratedStructure( GenerationTemplate* t, Framework::Vec3<int> originPos, Framework::Vec3<int> size, Framework::Vec3<int> minAffectedPos );
- ~GeneratedStructure();
- void setBlockAt( Framework::Either<Block*, int> block, Framework::Vec3<int> localPos );
- bool isBlockAffected( Framework::Vec3<int> location ) const;
- Framework::Either<Block*, int> generateBlockAt( Framework::Vec3<int> location ) const;
- Framework::Vec3<int> getOriginPos() const;
- GenerationTemplate* zTemplate() const;
- };
|