#include <cRegion.h>
A 2d (integer) region made of rectangles. loosely based on http://www.codeproject.com/KB/GDI/Regions.aspx
◆ cRegion() [1/2]
GrayLib::cRegion::cRegion |
( |
const cRectI & |
rect | ) |
|
◆ cRegion() [2/2]
GrayLib::cRegion::cRegion |
( |
| ) |
|
◆ ~cRegion()
GrayLib::cRegion::~cRegion |
( |
| ) |
|
|
virtual |
◆ AddRegion()
void GrayLib::cRegion::AddRegion |
( |
const cRegion * |
pRegionTest | ) |
|
◆ AddRegionRect()
bool GrayLib::cRegion::AddRegionRect |
( |
const cRectI & |
rect | ) |
|
|
virtual |
- Note
- we really should normalize this rect with any existing rects !
◆ EmptyRegion()
void GrayLib::cRegion::EmptyRegion |
( |
| ) |
|
|
inline |
◆ get_RectUnion()
const cRectI& GrayLib::cRegion::get_RectUnion |
( |
| ) |
const |
|
inline |
◆ get_RegionRectCount()
ITERATE_t GrayLib::cRegion::get_RegionRectCount |
( |
| ) |
const |
How many rectangles in this region ?
◆ GetRegionCorner()
◆ GetRegionRect()
Get a particular rectangle.
◆ IsEqualRegion()
bool GrayLib::cRegion::IsEqualRegion |
( |
const cRegion * |
pRegionTest | ) |
const |
◆ IsInsideMe() [1/2]
bool GrayLib::cRegion::IsInsideMe |
( |
const cRectI & |
rect | ) |
const |
Is rect fully inside this region?
◆ IsInsideMe() [2/2]
bool GrayLib::cRegion::IsInsideMe |
( |
const cRegion * |
pRegionIsSmaller | ) |
const |
Is the pRegionTest completely inside this region ?
◆ IsOverlapped() [1/2]
bool GrayLib::cRegion::IsOverlapped |
( |
const cRectI & |
rect | ) |
const |
Does the region overlap this rectangle.
◆ IsOverlapped() [2/2]
bool GrayLib::cRegion::IsOverlapped |
( |
const cRegion * |
pRegionTest | ) |
const |
Does the region overlap this other region.
◆ isRegionEmpty()
bool GrayLib::cRegion::isRegionEmpty |
( |
| ) |
const |
|
inline |
◆ isValidCheck()
virtual bool GrayLib::cRegion::isValidCheck |
( |
| ) |
const |
|
inlinevirtualnoexcept |
< memory allocation and structure definitions are valid.
NOT in MFC so use COBJECT_IsValidCheck to call.
- Note
- This can't be called in constructors and destructors of course !
Reimplemented from Gray::CObject.
◆ OptimizeRegionRects()
void GrayLib::cRegion::OptimizeRegionRects |
( |
| ) |
|
Get rid of overlapping rects. Combine adjacent rects that may be combined. m_rectUnion should not change !
◆ PtInRegion() [1/2]
bool GrayLib::cRegion::PtInRegion |
( |
const cPoint2i & |
pt | ) |
const |
|
inline |
◆ PtInRegion() [2/2]
bool GrayLib::cRegion::PtInRegion |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
is this point in the region?
◆ put_RectUnion()
void GrayLib::cRegion::put_RectUnion |
( |
const cRectI & |
rect | ) |
|
|
inline |
◆ RefRegionRect()
Get a particular rectangle. allow it to be modified!
◆ RemoveRegionRect()
void GrayLib::cRegion::RemoveRegionRect |
( |
ITERATE_t |
i | ) |
|
|
virtual |
◆ SetRegionSubtract()
void GrayLib::cRegion::SetRegionSubtract |
( |
const cRectI & |
rect1, |
|
|
const cRectI & |
rect2 |
|
) |
| |
Create a region by subtracting rect2 from rect1
◆ SubtractRegion()
bool GrayLib::cRegion::SubtractRegion |
( |
const cRegion * |
pRegionTest | ) |
|
- Returns
- true = was overlapped.
◆ SubtractRegionRect()
bool GrayLib::cRegion::SubtractRegionRect |
( |
const cRectI & |
rect | ) |
|
Subtract rect from this region.
- Returns
- true = overlap.
◆ UNITTEST_FRIEND()
GrayLib::cRegion::UNITTEST_FRIEND |
( |
cRegion |
| ) |
|
◆ v_GetRegion()
void GrayLib::cRegion::v_GetRegion |
( |
cVariant & |
vVal | ) |
const |
◆ v_SetRegion()
◆ m_rectUnion
cRectI GrayLib::cRegion::m_rectUnion |
|
protected |
The union rectangle. (may have holes in it of course)
The documentation for this class was generated from the following files:
- c:/Dennis/Source/Gray/GrayLib/include/Geometry/cRegion.h
- c:/Dennis/Source/Gray/GrayLib/src/Geometry/cRegion.cpp