ezEngine Release 26.3
Loading...
Searching...
No Matches
ezTextureAtlasRuntimeDesc Struct Reference

Runtime data for efficiently accessing items within a generated texture atlas. More...

#include <TextureAtlasDesc.h>

Classes

struct  Item
 

Public Member Functions

void Clear ()
 
ezResult Serialize (ezStreamWriter &inout_stream) const
 
ezResult Deserialize (ezStreamReader &inout_stream)
 

Public Attributes

ezUInt32 m_uiNumLayers = 0
 
ezArrayMap< ezUInt32, Itemm_Items
 

Detailed Description

Runtime data for efficiently accessing items within a generated texture atlas.

After a texture atlas is created and processed, this structure provides the information needed to find and render individual items from the packed atlas texture. It maps unique item IDs to their rectangular regions within each layer of the atlas.

Runtime Usage:

atlas.Load("MyAtlas.ezAtlas");
// Find an item by ID
auto item = atlas.m_Items.Find(itemID);
if (item.IsValid())
{
// Get UV coordinates for diffuse layer (layer 0)
ezRectU32 rect = item.Value().m_LayerRects[0];
// Convert to UV coordinates based on atlas texture size
}
Runtime data for efficiently accessing items within a generated texture atlas.
Definition TextureAtlasDesc.h:83

The documentation for this struct was generated from the following files: