Urho3D
|
Rectangular area allocator. More...
#include <AreaAllocator.h>
Public Member Functions | |
AreaAllocator (int width, int height) | |
Construct with given width and height. | |
void | Reset (int width, int height) |
Reset to given width and height and remove all previous allocations. | |
bool | Allocate (int width, int height, int &x, int &y) |
Try to allocate an area. Return true if successful, with x & y coordinates filled. |
Private Member Functions | |
bool | SplitRect (IntRect original, const IntRect &reserved) |
Cut the reserved area from a rectangle. Return true if the rectangle should be removed from the vector. | |
void | Cleanup () |
Remove overlapping free rectangles. |
Private Attributes | |
PODVector< IntRect > | freeAreas_ |
Free rectangles. |
Rectangular area allocator.