30 Mesh texture (
const std::string& textureID,
const uint32_t frame = 0)
const;
34 auto begin () {
return std::begin (mTextureMeshes); }
35 auto end () {
return std::end (mTextureMeshes); }
36 auto begin ()
const {
return std::cbegin (mTextureMeshes); }
37 auto end ()
const {
return std::cend (mTextureMeshes); }
40 struct FrameAndIndex {
41 FrameAndIndex () =
default;
42 FrameAndIndex (uint32_t count, uint32_t index)
43 : framesCount (count), textureIndex (index) {}
44 uint32_t framesCount = 0u;
45 uint32_t textureIndex = 0u;
48 std::vector <Mesh> mTextureMeshes;
49 std::unordered_map <std::string, FrameAndIndex> mIndexAndFrames;
Contains texture position and sub-box of all sprites for a given sprite sheet. Animations ca be handl...
Definition TextureAtlas.h:28
Compute texture meshes for a given texture map.
Definition TextureMeshes.h:18
void computeTextureMapping(const TextureAtlas &textures)
Compute texture mapping, this should be called before any texture() call.
Definition TextureMeshes.cpp:8
auto end()
Definition TextureMeshes.h:35
auto begin() const
Definition TextureMeshes.h:36
auto begin()
Definition TextureMeshes.h:34
Mesh texture(const std::string &textureID, const uint32_t frame=0) const
get computed texture mesh of an entry
Definition TextureMeshes.cpp:33
auto end() const
Definition TextureMeshes.h:37