Unravel Engine C++ Reference
|
Public Member Functions | |
RectanglePacker () | |
RectanglePacker (uint32_t _width, uint32_t _height) | |
void | init (uint32_t _width, uint32_t _height) |
non constructor initialization | |
bool | addRectangle (uint16_t _width, uint16_t _height, uint16_t &_outX, uint16_t &_outY) |
uint32_t | getUsedSurface () |
return the used surface in squared unit | |
uint32_t | getTotalSurface () |
return the total available surface in squared unit | |
float | getUsageRatio () |
return the usage ratio of the available surface [0:1] | |
void | clear () |
reset to initial state | |
Definition at line 16 of file cube_atlas.cpp.
gfx::RectanglePacker::RectanglePacker | ( | ) |
Definition at line 70 of file cube_atlas.cpp.
gfx::RectanglePacker::RectanglePacker | ( | uint32_t | _width, |
uint32_t | _height ) |
Definition at line 74 of file cube_atlas.cpp.
bool gfx::RectanglePacker::addRectangle | ( | uint16_t | _width, |
uint16_t | _height, | ||
uint16_t & | _outX, | ||
uint16_t & | _outY ) |
find a suitable position for the given rectangle
Definition at line 95 of file cube_atlas.cpp.
void gfx::RectanglePacker::clear | ( | ) |
reset to initial state
Definition at line 174 of file cube_atlas.cpp.
|
inline |
return the total available surface in squared unit
Definition at line 36 of file cube_atlas.cpp.
float gfx::RectanglePacker::getUsageRatio | ( | ) |
return the usage ratio of the available surface [0:1]
Definition at line 163 of file cube_atlas.cpp.
|
inline |
return the used surface in squared unit
Definition at line 30 of file cube_atlas.cpp.
void gfx::RectanglePacker::init | ( | uint32_t | _width, |
uint32_t | _height ) |
non constructor initialization
Definition at line 81 of file cube_atlas.cpp.