Urho3D
Public Member Functions | Private Member Functions | Private Attributes
Urho3D::AreaAllocator Class Reference

Rectangular area allocator. More...

#include <AreaAllocator.h>

List of all members.

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< IntRectfreeAreas_
 Free rectangles.

Detailed Description

Rectangular area allocator.


The documentation for this class was generated from the following files: