Axis-aligned rectangle packer for expandable square texture atlases with array layers.
More...
#include <GREM/resource/ArrayAtlasPacker.hpp>
Axis-aligned rectangle packer for expandable square texture atlases with array layers.
◆ ArrayAtlasPacker() [1/2]
| grem::resource::ArrayAtlasPacker::ArrayAtlasPacker |
( |
| ) |
|
|
inlinenoexcept |
Construct an atlas packer with the default options.
◆ ArrayAtlasPacker() [2/2]
Construct an atlas packer.
- Parameters
-
◆ insertBox()
Find and reserve a suitable space for a new axis-aligned box to be inserted into the atlas.
- Parameters
-
| size | size of the new box, in pixels and layers. |
- Returns
- see InsertBoxResult.
- Exceptions
-
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ getResolution()
| uint32_t grem::resource::ArrayAtlasPacker::getResolution |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the current required resolution of the atlas.
- Returns
- the width of the square atlas region, in pixels.
◆ getDepth()
| uint32_t grem::resource::ArrayAtlasPacker::getDepth |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the current required depth of the atlas.
- Returns
- the number of array layers in the atlas.
The documentation for this class was generated from the following file: