#ifndef TEXTURESHEET_H #define TEXTURESHEET_H #include #include #include #include #include #include #include #include "boost/shared_ptr.hpp" #include struct TexCoordRect { float texCoordFromX; float texCoordFromY; float texCoordToX; float texCoordToY; TexCoordRect() : texCoordFromX(0) , texCoordFromY(0) , texCoordToX(0) , texCoordToY(0) { } TexCoordRect(float itexCoordFromX, float itexCoordFromY, float itexCoordToX, float itexCoordToY) : texCoordFromX(itexCoordFromX) , texCoordFromY(itexCoordFromY) , texCoordToX(itexCoordToX) , texCoordToY(itexCoordToY) { } }; struct SpaceArea { int posX; int posY; int Width; int Height; SpaceArea() : posX(0) , posY(0) , Width(0) , Height(0) { } SpaceArea(int iposX, int iposY, int iWidth, int iHeight) : posX(iposX) , posY(iposY) , Width(iWidth) , Height(iHeight) { } }; class TextureSheet { protected: public: std::vector>> pixmapArray; std::vector imageNamesArray; boost::shared_ptr resultPixmap; std::vector> resultTexturePositions; std::vector spaceAreaArr; void Calculate(int width, int height); QString GetCalculatedXml(); void Clear(); }; #endif // TEXTURESHEET_H