CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csSubRectangles Class Reference
[Geometry utilities]

A class managing allocations of sub-rectangles. More...

#include <csgeom/subrec.h>

List of all members.

Public Member Functions

 csSubRectangles (const csRect &region)
 Allocate a new empty region with the given size.
 ~csSubRectangles ()
 Remove this region and sub-regions.
const csRectGetRectangle () const
 Get the rectangle for this region.
void Clear ()
 Free all rectangles in this region.
bool Alloc (int w, int h, csRect &rect)
 Allocate a new rectangle.
void Dump ()
 For debugging: dump all free rectangles.

Protected Attributes

csRect region
 Dimensions of this region.
csSubRectfirst
 First empty region.


Detailed Description

A class managing allocations of sub-rectangles.

i.e. this class represents a rectangular region from which a client can allocate smaller rectangles until the region is full.

Definition at line 53 of file subrec.h.


Constructor & Destructor Documentation

csSubRectangles::csSubRectangles const csRect region  ) 
 

Allocate a new empty region with the given size.

csSubRectangles::~csSubRectangles  ) 
 

Remove this region and sub-regions.


Member Function Documentation

bool csSubRectangles::Alloc int  w,
int  h,
csRect rect
 

Allocate a new rectangle.

Return false if there is no room

void csSubRectangles::Clear  ) 
 

Free all rectangles in this region.

void csSubRectangles::Dump  ) 
 

For debugging: dump all free rectangles.

const csRect& csSubRectangles::GetRectangle  )  const [inline]
 

Get the rectangle for this region.

Definition at line 69 of file subrec.h.


Member Data Documentation

csSubRect* csSubRectangles::first [protected]
 

First empty region.

Definition at line 59 of file subrec.h.

csRect csSubRectangles::region [protected]
 

Dimensions of this region.

Definition at line 57 of file subrec.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1