clan::TextureGroup Class Reference

Texture grouping class. More...

#include <texture_group.h>

Public Types

Enumerations
enum  TextureAllocationPolicy { create_new_texture, search_previous_textures }
 Texture allocation policy. More...
 

Public Member Functions

Construction
 TextureGroup ()
 Constructs a null instance. More...
 
 TextureGroup (const Size &texture_sizes)
 Constructs a texture group. More...
 
 ~TextureGroup ()
 
Attributes
bool is_null () const
 Returns true if this object is invalid. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
int get_subtexture_count () const
 Returns the amount of sub-textures allocated in group. More...
 
int get_subtexture_count (unsigned int texture_index) const
 Returns the amount of sub-textures for a specific texture index. More...
 
int get_texture_count () const
 Returns the amount of textures used by group. More...
 
TextureAllocationPolicy get_texture_allocation_policy () const
 Returns the texture allocation policy. More...
 
Size get_texture_sizes () const
 Returns the size of the textures used by this texture group. More...
 
std::vector< Texture2Dget_textures () const
 Returns the textures. More...
 
Operations
Subtexture add (GraphicContext &context, const Size &size)
 Allocate space for another sub texture. More...
 
void remove (Subtexture &subtexture)
 Deallocate space, from a previously allocated texture. More...
 
void set_texture_allocation_policy (TextureAllocationPolicy policy)
 Set the texture allocation policy. More...
 
void insert_texture (Texture2D &texture, const Rect &texture_rect)
 Insert an existing texture into the texture group. More...
 

Detailed Description

Texture grouping class.


The documentation for this class was generated from the following file: