123456789101112131415161718192021222324252627282930313233 |
- #pragma once
- #include <ReferenceCounter.h>
- #include <Vec3.h>
- #include <Either.h>
- #include "Block.h"
- class GenerationTemplate;
- class MultiblockStructure;
- class GeneratedStructure : public Framework::ReferenceCounter
- {
- private:
- int* blockIds;
- Block** blocks;
- Framework::Vec3<int> size;
- Framework::Vec3<int> minAffectedPos;
- Framework::Vec3<int> originPos;
- GenerationTemplate* t;
- MultiblockStructure* multiblock;
- 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;
- void addAllBlocksToStructure(MultiblockStructure* structure);
- Framework::Vec3<int> getOriginPos() const;
- GenerationTemplate* zTemplate() const;
- };
|