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