#include <mi32/region2d.h>
The sub-region can be represented by either a single rectangle or as a polygon and a list of zero or more islands. All POLYLINE's stored in the SUBREGION are closed.
Definition at line 237 of file region2d.h.
| typedef POLYLINELIST::CONST_ITERATOR SUBREGION2D::CONST_ITERATOR |
Definition at line 240 of file region2d.h.
| SUBREGION2D::SUBREGION2D | ( | ) |
Default Constructor.
| SUBREGION2D::SUBREGION2D | ( | const SUBREGION2D & | rhs | ) |
Copy Constructor.
| SUBREGION2D::~SUBREGION2D | ( | ) |
Destructor.
Assigns the sub-region to the passed in polygon This will clear any existing information in 'this'.
| void SUBREGION2D::AssignValidated | ( | const POLYLINELIST & | PolygonList | ) |
Assigns the sub-region to the passed in polygon list.
Assumes that the first polygon is the shell and the rest are islands. A validated polygon is a polygon that does not intersect itself. This will clear any existing information in 'this'
| void SUBREGION2D::AssignValidated | ( | const POLYLINE & | Polygon | ) |
Assigns the sub-region to the passed in polygon.
A validated polygon is a polygon that does not intersect itself. This will clear any existing information in 'this'
| CONST_ITERATOR SUBREGION2D::Begin | ( | ) | const [inline] |
Get the beginning of the list of POLYLINE's.
The first item is the shell polygon, the rest following are islands.
Definition at line 313 of file region2d.h.
| void SUBREGION2D::Clear | ( | ) |
Clear the sub-region.
| int SUBREGION2D::ClipLine | ( | POLYLINE & | PolyLine, | |
| POLYLINE::CLIP & | ClipTarget, | |||
| CLIPMODE | ClipMode = CLIPMODE_Inside | |||
| ) | const |
Clip a polyline to a sub-region, call the ClipTarget for each segment.
| double SUBREGION2D::ComputeArea | ( | ) | const |
Compute the sub-region area in sub-region units.
| double SUBREGION2D::ComputeAreaNoIslands | ( | ) | const |
Compute the sub-region area in sub-region units but do not exclude islands in the calculation.
| double SUBREGION2D::ComputePerimeter | ( | ) | const |
Compute the sub-region perimeter in sub-region units.
| double SUBREGION2D::ComputePerimeterNoIslands | ( | ) | const |
Compute the sub-region perimeter in sub-region units but do not include islands in the calculation.
| ERRVALUE SUBREGION2D::ConvertForward | ( | const SPATREF::COORDOP & | Op | ) |
Translate the subregion using a coordinate operation (SPATREF::COORDOP) transformation.
| ERRVALUE SUBREGION2D::ConvertForward | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the sub-region using a mapgen transformation.
| void SUBREGION2D::ConvertForward | ( | const TRANS2D_AFFINE & | taf | ) |
Translate the sub-region using an affine transformation.
| ERRVALUE SUBREGION2D::ConvertForwardDense | ( | const SPATREF::COORDOP & | Op, | |
| double | tolerance | |||
| ) |
Translate the region using a coordinate operation (SPATREF::COORDOP) transformation with densification If the region is the extents only, this will convert it to a proper sub-region before doing the transformation.
| ERRVALUE SUBREGION2D::ConvertForwardDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the sub-region using a mapgen transformation with densification If the sub-region is the extents only, this will convert it to a polygon sub-region before doing the transformation.
| ERRVALUE SUBREGION2D::ConvertInverse | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the sub-region using a mapgen transformation.
| void SUBREGION2D::ConvertInverse | ( | const TRANS2D_AFFINE & | taf | ) |
Translate the sub-region using an affine transformation.
| ERRVALUE SUBREGION2D::ConvertInverseDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the sub-region using a mapgen transformation with densification If the sub-region is the extents only, this will convert it to a polygon sub-region before doing the transformation.
| ERRVALUE SUBREGION2D::ConvertReverse | ( | const SPATREF::COORDOP & | Op | ) |
Translate the subregion using a coordinate operation (SPATREF::COORDOP) transformation.
| ERRVALUE SUBREGION2D::ConvertReverseDense | ( | const SPATREF::COORDOP & | Op, | |
| double | tolerance | |||
| ) |
Translate the subregion using a coordinate operation (SPATREF::COORDOP) transformation with densification If the subregion is the extents only, this will convert it to a proper sub-region before doing the transformation.
| ERRVALUE SUBREGION2D::ConvertToLongRound | ( | SIMPLE_ARRAY< LPOLYGON > & | PolygonArray, | |
| SIMPLE_ARRAY< LPOINT2D > & | PointArray | |||
| ) | const |
Convert subregion from double's to INT32's with rounding, removes duplicate points.
| ERRVALUE SUBREGION2D::ConvertToLongTruncate | ( | SIMPLE_ARRAY< LPOLYGON > & | PolygonArray, | |
| SIMPLE_ARRAY< LPOINT2D > & | PointArray | |||
| ) | const |
Convert subregion from double's to INT32's, truncating towards 0, removes duplicate points.
| ERRVALUE SUBREGION2D::CopyTo | ( | SUBREGION2D & | target, | |
| COPYFILTER & | filter | |||
| ) | const |
Copy subregion to specified target with filter.
| target | Target subregion |
| filter | Filter to determine which islands to copy |
| CONST_ITERATOR SUBREGION2D::End | ( | ) | const [inline] |
Generate a point inside of the subregion This does deal with the islands of the subregion, the point will not be in an island.
| const DRECT3D& SUBREGION2D::GetExtents | ( | ) | const [inline] |
Get sub-region extents.
Definition at line 435 of file region2d.h.
| const DRECT2D& SUBREGION2D::GetExtents2D | ( | ) | const [inline] |
Get sub-region extents.
Definition at line 440 of file region2d.h.
| INT32 SUBREGION2D::GetNumIslands | ( | ) | const [inline] |
Get number of islands in the sub-region.
Definition at line 445 of file region2d.h.
| ERRVALUE SUBREGION2D::Intersect | ( | const SUBREGION2D & | SubRegion, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Intersect an specified area against the sub-region If the "SubRegion" does not intersect with the sub-region area, 'this' will be set to empty.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::Intersect | ( | const POLYLINE & | PolyLine, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Intersect an specified area against the sub-region If the polygon does not intersect the sub-region area, 'this' will be set to empty If the "PolyLine" passed in is invalid, this method will only use one of the valid polygons it finds, otherwise the results will be in error.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::Intersect | ( | const DRECT2D & | Rect, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Intersect an specified rectangle area with the sub-region If the rectangle does not intersect with the sub-region area, 'this' will be set to empty.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::IntersectValidated | ( | const POLYLINE & | PolyLine, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Intersect an specified area from the sub-region known to be valid A validated polygon is a polygon that does not intersect itself.
If the polygon does not intersect the sub-region area, 'this' will be set to empty
| SubRegionList | Filled in if operation creates more than one sub-region |
| bool SUBREGION2D::IsEmpty | ( | ) | const [inline] |
| bool SUBREGION2D::IsEquivalentTo | ( | const SUBREGION2D & | rhs, | |
| double | threshold = 0.0 | |||
| ) | const |
Determine if the two subregions are equivalent This method uses "Fuzzy" vertex comparisons and the direction and order of the elements are not relevant Specify a different threshold to allow greater distances.
| threshold | Default threshold is max absolute value of rectangle coordinate * 1.0E-13 |
| bool SUBREGION2D::IsPointInside | ( | const DPOINT2D & | point | ) | const |
Determine if the point falls inside the sub-region.
| bool SUBREGION2D::IsRectangle | ( | ) | const [inline] |
| SUBREGION2D& SUBREGION2D::operator= | ( | const DRECT2D & | rhs | ) |
Assignment operator from rectangle.
| SUBREGION2D& SUBREGION2D::operator= | ( | const SUBREGION2D & | rhs | ) |
Assignment operator.
| void SUBREGION2D::RemoveIslands | ( | ) |
Remove all of the islands from the subregion.
| void SUBREGION2D::Reverse | ( | ) |
Reverse the orientation of the polygons and islands in the subregion.
| void SUBREGION2D::SetDimension | ( | DIMENSION | dim | ) |
Set the dimension of the points stored in 'this' as 2D or 3D vertices.
| void SUBREGION2D::SetOrientation | ( | ORIENTATION | Orientation | ) |
Set subregion orientation Outer shell polygon is set to the orientation specified in respect to itself.
Islands are set in the opposite orientation in respect to themselves
| ERRVALUE SUBREGION2D::Subtract | ( | const DRECT2D & | IslandRect, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Remove an specified rectangle area from the sub-region If the island removes the entire sub-region area, 'this' will be set to empty.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::Subtract | ( | const SUBREGION2D & | SubRegion, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Remove an specified area from the sub-region If the "SubRegion" removes the entire sub-region area, 'this' will be set to empty.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::Subtract | ( | const POLYLINE & | Island, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Remove an specified area from the sub-region If the island removes the entire sub-region area, 'this' will be set to empty If the "Island" passed in is invalid, this method will only use one of the valid polygons it finds, otherwise the results will be in error.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::SubtractValidated | ( | const POLYLINE & | Island, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Remove an specified area from the sub-region known to be valid A validated polygon is a polygon that does not intersect itself.
If the island removes the entire sub-region area, 'this' will be set to empty
| SubRegionList | Filled in if operation creates more than one sub-region |
| POLYLINE::COMPRESULT SUBREGION2D::TestLine | ( | const POLYLINE & | PolyLine | ) | const |
| bool SUBREGION2D::TestLine | ( | const POLYLINE & | PolyLine, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the line given the test criteria against the sub-region.
| bool SUBREGION2D::TestPoint | ( | const DPOINT2D & | Point, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the point given the test criteria against the sub-region.
| POLYLINE::COMPRESULT SUBREGION2D::TestPolygon | ( | const POLYLINE & | PolyLine | ) | const |
| bool SUBREGION2D::TestPolygon | ( | const POLYLINE & | PolyLine, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the polygon given the test criteria against the sub-region.
| POLYLINE::COMPRESULT SUBREGION2D::TestSubRegion | ( | const SUBREGION2D & | SubRegion | ) | const |
| bool SUBREGION2D::TestSubRegion | ( | const SUBREGION2D & | SubRegion, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the subregion given the test criteria against 'this'.
| ERRVALUE SUBREGION2D::Union | ( | const SUBREGION2D & | SubRegion, | |
| MILIST< SUBREGION2D > & | SubRegionList, | |||
| POLYLINE::COMBINERESULT & | CombineResult | |||
| ) |
Union (ADD) a sub-region to the sub-region.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::Union | ( | const POLYLINE & | PolyLine, | |
| MILIST< SUBREGION2D > & | SubRegionList | |||
| ) |
Union (ADD) a Polygon to the sub-region.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::Union | ( | const DRECT2D & | Rect, | |
| MILIST< SUBREGION2D > & | SubRegionList, | |||
| POLYLINE::COMBINERESULT & | CombineResult | |||
| ) |
Union (ADD) a rectangle to the sub-region.
| SubRegionList | Filled in if operation creates more than one sub-region |
| ERRVALUE SUBREGION2D::UnionValidated | ( | const POLYLINE & | PolyLine, | |
| MILIST< SUBREGION2D > & | SubRegionList, | |||
| POLYLINE::COMBINERESULT & | CombineResult | |||
| ) |
Union (ADD) a polygon to the sub-region.
| SubRegionList | Filled in if operation creates more than one sub-region |
1.5.2