CS::SubRectangles::SubRect Class Reference
Sub-rectangle. More...
#include <csgeom/subrec.h>
Protected Member Functions | |
SubRect * | Alloc (int w, int h, const AllocInfo &ai, csRect &r) |
Do the actual allocation. | |
void | DecideBestSplit (const csRect &rect, int splitX, int splitY, SubRect::SplitType &splitType) |
Decide whether a H or V split is better. | |
const csRect & | GetAllocedRect () const |
Return the area allocated from this subrectangle. | |
const csRect & | GetRect () const |
Return the area this subrectangle covers. | |
bool | IsEmpty () const |
Test if allocated area is empty. | |
void | MakeEmpty () |
Clear allocated area. | |
void | Reclaim () |
De-allocate. | |
void | TestAlloc (int w, int h, AllocInfo &ai) |
searches for the "ideal" position of a rectangle | |
void | TestCollapse () |
Test whether both children are empty. | |
Friends | |
class | csBlockAllocator< SubRect > |
Detailed Description
Sub-rectangle.
Definition at line 54 of file subrec.h.
Member Function Documentation
SubRect* CS::SubRectangles::SubRect::Alloc | ( | int | w, | |
int | h, | |||
const AllocInfo & | ai, | |||
csRect & | r | |||
) | [protected] |
Do the actual allocation.
void CS::SubRectangles::SubRect::DecideBestSplit | ( | const csRect & | rect, | |
int | splitX, | |||
int | splitY, | |||
SubRect::SplitType & | splitType | |||
) | [protected] |
Decide whether a H or V split is better.
The better split is the one where the bigger chunk results.
const csRect& CS::SubRectangles::SubRect::GetAllocedRect | ( | ) | const [inline, protected] |
const csRect& CS::SubRectangles::SubRect::GetRect | ( | ) | const [inline, protected] |
bool CS::SubRectangles::SubRect::IsEmpty | ( | ) | const [inline, protected] |
void CS::SubRectangles::SubRect::MakeEmpty | ( | ) | [inline, protected] |
void CS::SubRectangles::SubRect::Reclaim | ( | ) | [protected] |
De-allocate.
void CS::SubRectangles::SubRect::TestAlloc | ( | int | w, | |
int | h, | |||
AllocInfo & | ai | |||
) | [protected] |
searches for the "ideal" position of a rectangle
void CS::SubRectangles::SubRect::TestCollapse | ( | ) | [protected] |
Test whether both children are empty.
The documentation for this class was generated from the following file:
- csgeom/subrec.h
Generated for Crystal Space 2.0 by doxygen 1.6.1