Axis-aligned rectangle packer for expandable square texture atlases.
More...
#include <GREM/resource/AtlasPacker.hpp>
Axis-aligned rectangle packer for expandable square texture atlases.
◆ AtlasPacker() [1/2]
| grem::resource::AtlasPacker::AtlasPacker |
( |
| ) |
|
|
inlinenoexcept |
Construct an atlas packer with the default options.
◆ AtlasPacker() [2/2]
Construct an atlas packer.
- Parameters
-
◆ insertRectangle()
Find and reserve a suitable space for a new axis-aligned rectangle to be inserted into the atlas.
- Parameters
-
| size | size of the new rectangle, in pixels. |
- Returns
- see InsertRectangleResult.
- 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::AtlasPacker::getResolution |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the current required resolution of the atlas.
- Returns
- the width of the square atlas region, in pixels.
The documentation for this class was generated from the following file: