Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csSubRectangles Class Reference

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

#include <subrec.h>

List of all members.

Public Methods

 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. More...

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.


Member Function Documentation

bool csSubRectangles::Alloc ( int w,
int h,
csRect & rect )
 

Allocate a new rectangle.

Return false if there is no room


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000