33 #include "../../Core/Math/size.h"
34 #include "../../Core/Math/rect.h"
50 explicit operator bool() {
return (
bool)
texture(); }
52 const Texture2DPtr &
texture()
const {
return _texture; }
56 Texture2DPtr _texture;
90 virtual std::vector<Texture2DPtr>
textures()
const = 0;
109 virtual void insert_texture(
const Texture2DPtr &texture,
const Rect &texture_rect) = 0;
std::shared_ptr< Texture2D > Texture2DPtr
Definition: image.h:42
2D (width,height) size structure - Integer
Definition: size.h:167
TextureGroupImage(const Texture2DPtr &texture, const Rect &geometry)
Definition: texture_group.h:48
virtual void insert_texture(const Texture2DPtr &texture, const Rect &texture_rect)=0
Insert an existing texture into the texture group.
virtual std::vector< Texture2DPtr > textures() const =0
Returns the textures.
virtual Size texture_size() const =0
Returns the size of the textures used by this texture group.
TextureGroupImage()
Definition: texture_group.h:47
virtual int subtexture_count() const =0
Returns the amount of sub-textures allocated in group.
virtual TextureGroupAllocationPolicy allocation_policy() const =0
Returns the texture allocation policy.
virtual void set_allocation_policy(TextureGroupAllocationPolicy policy)=0
Set the texture allocation policy.
const Texture2DPtr & texture() const
Definition: texture_group.h:52
virtual TextureGroupImage add(const GraphicContextPtr &context, const Size &size)=0
Allocate space for another sub texture.
TextureGroupAllocationPolicy
TextureGroup allocation policy.
Definition: texture_group.h:61
Dynamic atlas texture class.
Definition: texture_group.h:68
static std::shared_ptr< TextureGroup > create(const Size &texture_size)
Constructs a texture group.
2D (left,top,right,bottom) rectangle structure - Integer
Definition: rect.h:491
std::shared_ptr< TextureGroup > TextureGroupPtr
Definition: texture_group.h:112
std::shared_ptr< GraphicContext > GraphicContextPtr
Definition: d3d_target.h:49
const Rect & geometry() const
Definition: texture_group.h:53
Definition: Application/application.h:35
Image position in a TextureGroup.
Definition: texture_group.h:44
virtual int texture_count() const =0
Returns the amount of textures used by group.