csRectRegion Class ReferenceA rect region is a class that implements splittable 2d rectangles.
Public Member Functions
|void||ClipTo (csRect &clip)|
|Clips everything in the region to the borders given. |
|size_t||Count () const|
|Returns the number of rectangles in this region. |
|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). |
|Resets the region count to zero. |
|const csRect &||RectAt (size_t i) const|
|Returns the rect at a specific index. |
Protected Member Functions
|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. |
|Gathers all regions since the mark into the fragment buffer. |
|Marks the current region insertion point for gather. |
|The fragment buffer, used for performing fragment operations. |
|The gather marker. |
|csArray< csRect >||region|
|The pointer the list of regions. |
Static Protected Attributes
|static const size_t||FRAGMENT_BUFFER_SIZE = 64|
Detailed DescriptionA 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.
Constructor & Destructor Documentation
Member Function Documentation
|void csRectRegion::ClipTo||(||csRect &||clip||)|
Clips everything in the region to the borders given.
|size_t csRectRegion::Count||(||)|| const
|void csRectRegion::Exclude||(||const csRect &||rect||)|
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.
|void csRectRegion::Include||(||const csRect &||rect||)|
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.
|const csRect& csRectRegion::RectAt||(||size_t||i||)|| const
Member Data Documentation
The documentation for this class was generated from the following file:
Generated for Crystal Space 1.0.2 by doxygen 1.4.7