2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCTextureAtlas : public CCObject
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
unsigned int getTotalQuads();
|
|
|
|
unsigned int getCapacity();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setTexture(CCTexture2D* val);
|
|
|
|
CCTexture2D* getTexture();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setQuads(ccV3F_C4B_T2F_Quad* val);
|
|
|
|
ccV3F_C4B_T2F_Quad* getQuads();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void updateQuad(ccV3F_C4B_T2F_Quad* quad, unsigned int index);
|
|
|
|
void insertQuad(ccV3F_C4B_T2F_Quad* quad, unsigned int index);
|
|
|
|
void insertQuadFromIndex(unsigned int fromIndex, unsigned int newIndex);
|
|
|
|
void removeQuadAtIndex(unsigned int index);
|
|
|
|
void removeAllQuads();
|
|
|
|
bool resizeCapacity(unsigned int n);
|
|
|
|
void drawNumberOfQuads(unsigned int n);
|
|
|
|
void drawNumberOfQuads(unsigned int n, unsigned int start);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void increaseTotalQuadsWith(unsigned int amount);
|
|
|
|
void moveQuadsFromIndex(unsigned int oldIndex, unsigned int amount, unsigned int newIndex);
|
|
|
|
void moveQuadsFromIndex(unsigned int index, unsigned int newIndex);
|
|
|
|
void fillWithEmptyQuadsFromIndex(unsigned int index, unsigned int amount);
|
2012-02-02 14:26:38 +08:00
|
|
|
void drawQuads();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-06-27 14:21:29 +08:00
|
|
|
static CCTextureAtlas* create(const char* file , unsigned int capacity);
|
2012-08-10 18:14:04 +08:00
|
|
|
static CCTextureAtlas* createWithTexture(CCTexture2D *texture, unsigned int capacity);
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|