ChunkModelBuilder.h 874 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include <ReferenceCounter.h>
  3. #include <Punkt.h>
  4. #include <Text.h>
  5. class Block;
  6. class Chunk;
  7. class FactoryCraftModel;
  8. struct GroundModelPart
  9. {
  10. int* indexList;
  11. int indexCount;
  12. int indexArraySize;
  13. Framework::Text name;
  14. };
  15. class ChunkModelBuilder : public Framework::ReferenceCounter
  16. {
  17. private:
  18. Chunk* zChunk;
  19. int type;
  20. protected:
  21. FactoryCraftModel* target;
  22. Block** blocks();
  23. void setBlockPartOfModel(Block* zBlock, bool partOfModel);
  24. Framework::Punkt chunkCenter();
  25. public:
  26. ChunkModelBuilder(FactoryCraftModel* target, Chunk* zChunk, int type);
  27. ~ChunkModelBuilder();
  28. virtual void buildModel() = 0;
  29. virtual bool updateLightning() = 0;
  30. FactoryCraftModel* zModel() const;
  31. int getType() const;
  32. virtual bool isTransparent() const = 0;
  33. virtual bool isPartOfModel(Block* zBlock) const = 0;
  34. };