|
CeresEngine 0.2.0
A game development framework
|
Utility class used for texture atlas layouts. More...
#include <CeresEngine/Texture/TextureAtlasLayout.hpp>
Classes | |
| struct | Element |
| Represents a single element used as in input to TextureAtlasUtility. More... | |
| struct | Page |
| Describes a single page of the texture atlas. More... | |
Static Public Member Functions | |
| static Vector< Page > | createAtlasLayout (Vector< Element > &elements, UInt32 width, UInt32 height, UInt32 maxWidth, UInt32 maxHeight, bool pow2=false) |
| Creates an optimal texture layout by packing texture elements in order to end up with as little empty space as possible. | |
Utility class used for texture atlas layouts.
|
static |
Creates an optimal texture layout by packing texture elements in order to end up with as little empty space as possible.
Algorithm will split elements over multiple textures if they don't fit in a single texture.
| elements | Elements to process. They need to have their input structures filled in, and this method will fill output when it returns. |
| width | Initial width of the atlas texture. |
| height | Initial height of the atlas texture. |
| maxWidth | Maximum width the atlas texture is allowed to grow to, when elements don't fit. |
| maxHeight | Maximum height the atlas texture is allowed to grow to, when elements don't fit. |
| pow2 | When true the resulting atlas size will always be a power of two. |