csRectRegion Class Reference
[Geometry utilities]
A rect region is a class that implements splittable 2d rectangles.
More...
#include <csgeom/csrectrg.h>
Public Member Functions | |
void | ClipTo (csRect &clip) |
Clips everything in the region to the borders given. | |
int | Count () const |
Returns the number of rectangles in this region. | |
csRectRegion () | |
Constructor. | |
void | Exclude (const csRect &rect) |
Exclude a rect from this region; may cause splitting. | |
void | Include (const csRect &rect) |
Add a rect to this region; may cause unions, but will not adjance (see csRect). | |
void | makeEmpty () |
Resets the region count to zero. | |
csRect & | RectAt (int i) const |
Returns the rect at a specific index. | |
~csRectRegion () | |
Destructor. | |
Protected Member Functions | |
void | deleteRect (int) |
Removes a rect from the region. | |
void | fragmentContainedRect (csRect &r1, csRect &r2) |
Work method fragments rects properly when they intersect. | |
void | fragmentRect (csRect &, csRect &, int mode) |
Controls fragmentContainedRect, used to perform all-side clipping and edge intersection. | |
void | gatherFragments () |
Gathers all regions since the mark into the fragment buffer. | |
void | markForGather () |
Marks the current region insertion point for gather. | |
void | pushRect (csRect const &) |
Pushes a new rect into the region, increases buffer if necessary. | |
Protected Attributes | |
csRect | fragment [FRAGMENT_BUFFER_SIZE] |
The fragment buffer, used for performing fragment operations. | |
int | gather_mark |
The gather marker. | |
csRect * | region |
The pointer the list of regions. | |
int | region_count |
The number of regions currently stored. | |
int | region_max |
The size of the region buffer (in rects). |
Detailed Description
A rect region is a class that implements splittable 2d rectangles.The region may be composed of one or more rectangles that do not need to occupy the same area. The idea being that you need to be able to have a number of disparate rectangular regions for updates. This class uses csRect for nearly all rectangle operations.
To use you can Include and Exclude rectangles from this region. When finished, this class will have a list of optimal rectangles that occupy a region. If used properly, it will result in faster overall painting performance, since several areas will not require overwriting.
Definition at line 56 of file csrectrg.h.
Constructor & Destructor Documentation
|
Constructor.
|
|
Destructor.
|
Member Function Documentation
|
Clips everything in the region to the borders given.
|
|
Returns the number of rectangles in this region.
Definition at line 100 of file csrectrg.h. |
|
Removes a rect from the region.
|
|
Exclude a rect from this region; may cause splitting.
|
|
Work method fragments rects properly when they intersect.
|
|
Controls fragmentContainedRect, used to perform all-side clipping and edge intersection.
|
|
Gathers all regions since the mark into the fragment buffer.
|
|
Add a rect to this region; may cause unions, but will not adjance (see csRect).
|
|
Resets the region count to zero.
|
|
Marks the current region insertion point for gather.
|
|
Pushes a new rect into the region, increases buffer if necessary.
|
|
Returns the rect at a specific index.
Definition at line 102 of file csrectrg.h. |
Member Data Documentation
|
The fragment buffer, used for performing fragment operations.
Definition at line 66 of file csrectrg.h. |
|
The gather marker.
Definition at line 68 of file csrectrg.h. |
|
The pointer the list of regions.
Definition at line 60 of file csrectrg.h. |
|
The number of regions currently stored.
Definition at line 62 of file csrectrg.h. |
|
The size of the region buffer (in rects).
Definition at line 64 of file csrectrg.h. |
The documentation for this class was generated from the following file:
- csgeom/csrectrg.h
Generated for Crystal Space by doxygen 1.4.4