#include <mi32/polyline.h>
Public Types | |
| enum | COMBINERESULT { COMBINERESULT_Disjoint = 1, COMBINERESULT_OperInsideSrc = 2, COMBINERESULT_SrcInsideOper = 3, COMBINERESULT_Equal = 4, COMBINERESULT_Intersect = 5, COMBINERESULT_ClipOutside = COMBINERESULT_Disjoint, COMBINERESULT_ClipInside = COMBINERESULT_OperInsideSrc, COMBINERESULT_SrcInside = COMBINERESULT_SrcInsideOper } |
| enum | COMPRESULT { COMPRESULT_Outside = 1, COMPRESULT_Inside, COMPRESULT_Intersect, COMPRESULT_Overlap } |
| enum | EXTRACT { EXTRACT_StartPoint = 1, EXTRACT_CenterPoint, EXTRACT_EndPoint } |
| enum | JOINTYPE { JOINTYPE_Miter = 0, JOINTYPE_Round, JOINTYPE_Bevel } |
| typedef DOUBLE_ARRAY< SECTION > | SECTIONARRAY |
| enum | SPLINE { SPLINE_NoSpline = 0, SPLINE_Cubic, SPLINE_Quadratic, SPLINE_Bezier } |
| enum | SPLINEFLAGS { SPLINEFLAG_None = 0x0000, SPLINEFLAG_DontMoveEnds = 0x0001, SPLINEFLAG_UseMinDistance = 0x0002, SPLINEFLAG_TreatAsClosed = 0x0004 } |
| enum | THINMETHOD { THINMETHOD_MinRatio = 1, THINMETHOD_Minimum, THINMETHOD_Douglas } |
Public Member Functions | |
| ERRVALUE | AddVertex (const DPOINT3D &point, INT32 index=-1) |
| ERRVALUE | AddVertex (const DPOINT2D &point, INT32 index=-1) |
| ERRVALUE | Append (const POLYLINE &rhs, bool RemovePoints=true) |
| void | ApplyZScale (double zscale) |
| ERRVALUE | Assign (const DRECT3D &rect) |
| ERRVALUE | Assign (const DRECT2D &rect, double ZValue=0.0) |
| ERRVALUE | Assign (const DOUBLE_ARRAY< DPOINT3D > &rhs, bool closed=false) |
| ERRVALUE | Assign (const DOUBLE_ARRAY< DPOINT2D > &rhs, bool closed=false, double ZValue=0.0) |
| ERRVALUE | Assign (const LPOINT2D *rhs, int NumPoints, bool closed=false, double ZValue=0.0) |
| ERRVALUE | Assign (const SIMPLE_ARRAY< LPOINT2D > &rhs, bool closed=false, double ZValue=0.0) |
| ERRVALUE | Assign (const DPOINT2D *pts, INT32 NumPoints, bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0) |
| ERRVALUE | Assign (const DPOLYGON &dpoly, bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0) |
| void | Attach (MIDOUBLEARRAY &rhs, INT32 NumPoints, bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0) |
| ITERATOR | Begin () |
| CONST_ITERATOR | Begin () const |
| void | Clear () |
| void | Clear () |
| void | Clear () |
| void | ClearOptimizations () |
| void | ClearPoints (INT32 StartPosn=0, INT32 EndPosn=INT32_MAX) |
| int | Clip (const DRECT2D &ClipRect, CLIP &ClipTarget, CLIPMODE ClipMode=CLIPMODE_Inside) |
| COMPRESULT | CompareLineToLine (const POLYLINE &OtherLine) const |
| COMPRESULT | CompareLineToPolygon (const DRECT2D &rect) const |
| COMPRESULT | CompareLineToPolygon (const POLYLINE &Polygon) const |
| COMPRESULT | ComparePolygonToPolygon (const POLYLINE &OtherPoly) const |
| double | ComputeAngle () const |
| double | ComputeArea () const |
| void | ComputeCentroid (DPOINT2D ¢) const |
| double | ComputeDistance (const POLYLINE &OtherLine, bool ExtentsOverlap=true) const |
| bool | ComputeDistPointOnLine (double Distance, DPOINT3D &NewPoint, bool DistanceFromStart=true) const |
| void | ComputeExtents (DRECT2D &rect, INT32 StartVertex, INT32 EndVertex) const |
| void | ComputeExtents (DRECT2D &rect) const |
| void | ComputeExtents (DRECT3D &rect, INT32 StartVertex, INT32 EndVertex) const |
| void | ComputeExtents (DRECT3D &rect) const |
| double | ComputeLength (const DPOINT3D &point) const |
| double | ComputeLength () const |
| double | ComputeLongestSegmentLength () const |
| double | ComputeMaxDimension () const |
| void | ComputeMidPoint (DPOINT3D &MidPoint) const |
| ERRVALUE | ComputeOffset (const SIMPLE_ARRAY< double > &OffsetDistance, POLYLINE &OffsetLine, JOINTYPE JoinType=JOINTYPE_Miter) const |
| ERRVALUE | ComputeOffset (double StartOffsetDistance, double EndOffsetDistance, POLYLINE &OffsetLine, JOINTYPE JoinType=JOINTYPE_Miter) const |
| ERRVALUE | ComputeOffset (double OffsetDistance, POLYLINE &OffsetLine, JOINTYPE JoinType=JOINTYPE_Miter) const |
| ORIENTATION | ComputeOrientation () const |
| void | ComputePercentPointOnLine (double Percent, DPOINT3D &NewPoint, bool DistanceFromStart=true) const |
| ERRVALUE | ComputeSections (const POLYLINE &PolyLine, INT32 NumVertices=64) |
| ORIENTATION | ComputeStats (double *const area, DPOINT2D *const centroid) const |
| ERRVALUE | ComputeStrips (const POLYLINE &PolyLine, INT32 NumDivs=0) |
| ERRVALUE | ComputeStrips (const POLYLINE &PolyLine, const DRECT2D &PolyExtents, INT32 NumDivs=0) |
| ERRVALUE | Conflate (POLYLINELIST &LineList, double thresh, bool &LineChanged, BITSET_UNOWNED &LineListSet) |
| ERRVALUE | Conflate (double thresh, bool &LineChanged) |
| ERRVALUE | ConvertForward (const SPATREF::COORDOP &Op) |
| void | ConvertForward (const TRANS3D &t3d) |
| ERRVALUE | ConvertForward (const TRANS2D_MAPGEN &tmg) |
| void | ConvertForward (const TRANS2D_AFFINE &taf) |
| ERRVALUE | ConvertForwardDense (const SPATREF::COORDOP &Op, double tolerance) |
| ERRVALUE | ConvertForwardDense (const TRANS2D_MAPGEN &tmg) |
| void | ConvertInverse (const TRANS3D &t3d) |
| ERRVALUE | ConvertInverse (const TRANS2D_MAPGEN &tmg) |
| void | ConvertInverse (const TRANS2D_AFFINE &taf) |
| ERRVALUE | ConvertInverseDense (const TRANS2D_MAPGEN &tmg) |
| ERRVALUE | ConvertReverse (const SPATREF::COORDOP &Op) |
| ERRVALUE | ConvertReverseDense (const SPATREF::COORDOP &Op, double tolerance) |
| INT32 | ConvertToLong (LPOINT2D *LPointList) const |
| ERRVALUE | ConvertToLong (SIMPLE_ARRAY< LPOINT2D > &LPointList) const |
| INT32 | ConvertToLongRound (LPOINT2D *LPointList) const |
| ERRVALUE | ConvertToLongRound (SIMPLE_ARRAY< LPOINT2D > &LPointList) const |
| ERRVALUE | ConvertToLongRoundKeepDups (SIMPLE_ARRAY< LPOINT2D > &LPointList) const |
| void | DeleteVertex (int index) |
| void | Detach (MIDOUBLEARRAY &rhs) |
| void | DetachBuffer (MIDOUBLEARRAY &rhs) |
| CONST_ITERATOR | End () const |
| ITERATOR | End () |
| ERRVALUE | ExclusiveUnion (POLYLINE &OperPoly, POLYLINELIST &PolyLineList, COMBINERESULT &CombineResult) |
| void | Extract (INT32 StartPosn, INT32 NumPoints, POLYLINE &ExtractLine) const |
| void | Extract (POLYLINE &NewLine, const DPOINT3D &StartPoint, const DPOINT3D &EndPoint) const |
| void | Extract (POLYLINE &NewLine, const DPOINT3D &BasePoint, double Distance, EXTRACT ExtractPoint, bool ExtrudePastEnds=false) const |
| double | FindClosestPoint (const DPOINT3D &point, double MaximumDistance, DPOINT3D &retpt, INT32 &Vertex) const |
| double | FindClosestPoint (const DPOINT3D &point, DPOINT3D &retpt) const |
| double | FindClosestPoint (const DPOINT2D &point, DPOINT2D &retpt) const |
| int | FindClosestSegment (const DPOINT2D &point, double *distance=0) const |
| double | FindClosestVertex (const DPOINT3D &point, INT32 &index) const |
| int | FindClosestVertex (const DPOINT2D &point, double *distance=0) const |
| double | FindClosestVertex (const DPOINT2D &point, INT32 &index) const |
| void | GenerateExtentOptimization () const |
| void | GenerateExtentOptimization (DRECT2D &Extents) const |
| void | GenerateSectionOptimization (INT32 NumVertices=64) const |
| ERRVALUE | GenerateSectionOptimization (SECTIONS *&Sections, INT32 NumVertices=64) const |
| ERRVALUE | GenerateStripOptimization (INT32 NumDivs=0) const |
| ERRVALUE | GenerateStripOptimization (STRIPS *&Strips, INT32 NumDivs=0) const |
| DIMENSION | GetDimension () const |
| bool | GetExtentsOptimization (DRECT2D &Extents) const |
| INT32 | GetNumPoints () const |
| const POLYLINE::SECTIONARRAY & | GetSectionArray () const |
| ERRVALUE | GetStrip (double yinit, double ylast, SIMPLE_ARRAY< INT32_RANGE > &Strip) const |
| const SIMPLE_ARRAY< INT32_RANGE > & | GetStrip (double y) const |
| void | GetTestPoint (DPOINT3D &pt) const |
| const DPOINT2D & | GetVertex (INT32 index) const |
| void | GetVertex3D (INT32 index, DPOINT3D &pt) const |
| double | GetVertexZ (INT32 index) const |
| ERRVALUE | GetVertices (DPOLYGON &dpoly) const |
| ERRVALUE | GetVertices (DOUBLE_ARRAY< DPOINT3D > &vertices) const |
| ERRVALUE | GetVertices (DOUBLE_ARRAY< DPOINT2D > &vertices) const |
| double | GetZValue () const |
| bool | HasSectionOptimization () const |
| bool | HasStripOptimization () const |
| int | Intersect (POLYLINE &OperPoly, POLYLINELIST &PolyLineList, COMBINERESULT &CombineResult) |
| void | IntersectClean (INTERSECTINFO &IntsInfo) const |
| ERRVALUE | IntersectSearch (INTERSECTINFO &IntsInfo, const POLYLINE &OtherLine, INTERSECTINFO *OtherIntsInfo, double threshold) const |
| ERRVALUE | IntersectSearch (INTERSECTINFO &IntsInfo, double threshold) const |
| ERRVALUE | IntersectSplitLine (INTERSECTINFO &IntsInfo, SPLIT &SplitInfo, double threshold, bool CallBadSegment=false) const |
| bool | IsClosed () const |
| bool | IsEqual (const POLYLINE &rhs) const |
| bool | IsEquivalentTo (const POLYLINE &rhs, double threshold=0.0) const |
| bool | IsPointInside (const DPOINT2D &pt) const |
| bool | IsRectangle () const |
| bool | IsValid () const |
| bool | IsValid () const |
| void | MoveVertex (int index, const DPOINT2D &delta, int FixedVertex1=-1, int FixedVertex2=-1) |
| POLYLINE & | operator+= (const POLYLINE &rhs) |
| STRIPS & | operator= (const STRIPS &rhs) |
| SECTIONS & | operator= (const SECTIONS &rhs) |
| POLYLINE & | operator= (const POLYLINE &rhs) |
| POLYLINE (const POLYLINE &rhs, INT32 StartVertex, INT32 EndVertex) | |
| POLYLINE (const POLYLINE &rhs) | |
| POLYLINE (const DOUBLE_ARRAY< DPOINT3D > &rhs, bool closed=false) | |
| POLYLINE (const LPOINT2D *points, INT32 NumPoints, bool closed=false, double ZValue=0.0) | |
| POLYLINE (const SIMPLE_ARRAY< LPOINT2D > &rhs, bool closed=false, double ZValue=0.0) | |
| POLYLINE (const DOUBLE_ARRAY< DPOINT2D > &rhs, bool closed=false, double ZValue=0.0) | |
| POLYLINE (DOUBLE_ARRAY< double > &rhs, bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0) | |
| POLYLINE (const DPOINT2D *pts, INT32 NumPoints, bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0) | |
| POLYLINE (const DPOLYGON &dpoly, bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0) | |
| POLYLINE (const DRECT3D &rect) | |
| POLYLINE (const DRECT2D &rect, double ZValue=0.0) | |
| POLYLINE (bool closed=false, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0, UINT32 ReservePoints=1) | |
| void | RemoveDuplicates (double thresh=0.0, bool KeepEndPoints=false) |
| ERRVALUE | Reserve (INT32 NumPoints) |
| void | Reverse () |
| SECTIONS (const SECTIONS &rhs) | |
| SECTIONS () | |
| void | SetClosed (bool closed) |
| ERRVALUE | SetDimension (DIMENSION dimension) |
| void | SetOrientation (ORIENTATION Orientation) |
| void | SetPrecision (int Precision) |
| void | SetSectionArray (const POLYLINE::SECTIONARRAY &SectionArray) |
| void | SetupExtentOptimization (const DRECT2D &Extents) const |
| void | SetupOrientationOptimization (ORIENTATION Orientation) const |
| void | SetupSectionOptimization (const SECTIONS &Sections) const |
| void | SetupStripOptimization (const STRIPS &Strips) const |
| void | SetVertex (INT32 index, const DPOINT3D &pt) |
| void | SetVertex (INT32 index, const DPOINT2D &pt) |
| void | SetVertexZ (INT32 index, double z) |
| void | SetZValue (double ZValue) |
| void | Spline (SPLINE SplineType, INT32 NumKnots, double tolerance, SPLINEFLAGS flags=SPLINEFLAG_None) |
| void | SplineZ (SPLINE SplineType, INT32 NumKnots, double tolerance, SPLINEFLAGS flags=SPLINEFLAG_None) |
| void | Straighten () |
| STRIPS (const STRIPS &rhs) | |
| STRIPS () | |
| int | Subtract (POLYLINE &OperPoly, POLYLINELIST &PolyLineList, COMBINERESULT &CombineResult) |
| void | Thin (THINMETHOD Method, double Factor) |
| void | TransferOwnerFrom (DOUBLE_ARRAY< DPOINT3D > &rhs) |
| void | TransferOwnerFrom (DOUBLE_ARRAY< DPOINT2D > &rhs) |
| void | TransferOwnerTo (DOUBLE_ARRAY< DPOINT3D > &rhs) |
| void | TransferOwnerTo (DOUBLE_ARRAY< DPOINT2D > &rhs) |
| ERRVALUE | Triangulate (SIMPLE_ARRAY< DTRIANGLE2D > &triangles) const |
| int | Union (POLYLINE &OperPoly, POLYLINELIST &PolyLineList, COMBINERESULT &CombineResult) |
| int | ValidatePolygon (CLIP &ClipTarget) const |
| ~POLYLINE () | |
| ~SECTIONS () | |
| ~STRIPS () | |
Classes | |
| class | CLIP |
| Clip() base callback class. More... | |
| class | CONST_ITERATOR |
| Constant iterator. More... | |
| class | INTERSECTINFO |
| Intersection information container class. More... | |
| class | ITERATOR |
| Non-const iterator. More... | |
| class | SECTION |
| class | SPLIT |
| IntersectSplitLine() base callback class. More... | |
Its primary use is for manipulation of coordinates whether in 2D or 3D. It does not maintain polygon topology (i.e. crossing segments are not resolved). The base storage method is a MIDOUBLEARRAY, by which alignment is maintained.
A POLYLINE instance can have associated with it certain optimization setups to improve some of the methods response times. They are currently "Extents", "Section", and "Strip" optimizations. The methods that can make use of these optimizations will state that in the documentation for that method.
Definition at line 371 of file polyline.h.
| typedef DOUBLE_ARRAY<SECTION> POLYLINE::SECTIONARRAY |
Values returned for Union(), Intersect(), Subtract() and ExclusiveUnion().
Definition at line 382 of file polyline.h.
| enum POLYLINE::COMPRESULT |
Definition at line 374 of file polyline.h.
| enum POLYLINE::EXTRACT |
Definition at line 394 of file polyline.h.
| enum POLYLINE::JOINTYPE |
| enum POLYLINE::SPLINE |
Definition at line 413 of file polyline.h.
| SPLINEFLAG_None | |
| SPLINEFLAG_DontMoveEnds | |
| SPLINEFLAG_UseMinDistance | |
| SPLINEFLAG_TreatAsClosed |
Definition at line 406 of file polyline.h.
| enum POLYLINE::THINMETHOD |
Definition at line 420 of file polyline.h.
| POLYLINE::POLYLINE | ( | bool | closed = false, |
|
| DIMENSION | dimension = DIMENSION_2D, |
|||
| double | ZValue = 0.0, |
|||
| UINT32 | ReservePoints = 1 | |||
| ) |
Default constructor.
| closed | Create and maintain a closed polyline |
| dimension | Create a 2D or 3D line |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| ReservePoints | Initial number of points to reserve in buffer |
| POLYLINE::POLYLINE | ( | const DRECT2D & | rect, | |
| double | ZValue = 0.0 | |||
| ) | [explicit] |
| POLYLINE::POLYLINE | ( | const DRECT3D & | rect | ) | [explicit] |
| POLYLINE::POLYLINE | ( | DOUBLE_ARRAY< double > & | rhs, | |
| bool | closed = false, |
|||
| DIMENSION | dimension = DIMENSION_2D, |
|||
| double | ZValue = 0.0 | |||
| ) | [explicit] |
Constructor from DOUBLE_ARRAY<double> This constructor transfers ownership from the DOUBLE_ARRAY<>.
| closed | Create and maintain a closed polyline |
| dimension | Create a 2D or 3D line |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| POLYLINE::POLYLINE | ( | const DOUBLE_ARRAY< DPOINT2D > & | rhs, | |
| bool | closed = false, |
|||
| double | ZValue = 0.0 | |||
| ) | [explicit] |
Constructor from DOUBLE_ARRAY<DPOINT2D>.
| closed | Create and maintain a closed polyline |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| POLYLINE::POLYLINE | ( | const SIMPLE_ARRAY< LPOINT2D > & | rhs, | |
| bool | closed = false, |
|||
| double | ZValue = 0.0 | |||
| ) | [explicit] |
Constructor from DOUBLE_ARRAY<DPOINT2D>.
| closed | Create and maintain a closed polyline |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| POLYLINE::POLYLINE | ( | const DOUBLE_ARRAY< DPOINT3D > & | rhs, | |
| bool | closed = false | |||
| ) | [explicit] |
| POLYLINE::POLYLINE | ( | const POLYLINE & | rhs | ) |
Copy constructor Will use any optimizations associated with "rhs".
Section copy constructor NO optimizations associated with "rhs" will be used.
| rhs | POLYLINE to copy from |
| StartVertex | Start vertex of 'rhs |
| EndVertex | End vertex of 'rhs' (Inclusive) |
| POLYLINE::~POLYLINE | ( | ) |
Destructor.
| POLYLINE::~SECTIONS | ( | ) |
| POLYLINE::~STRIPS | ( | ) |
Add a vertex to the line.
| point | Point to add |
| index | Default location is the end of the line |
Add a vertex to the line.
| point | Point to add |
| index | Default location is the end of the line |
Append a POLYLINE to this one, by default removing duplicates and collinear points at the joined section This method will update the "Extents" optimization for 'this' if both 'this' and 'rhs' have that optimization.
| void POLYLINE::ApplyZScale | ( | double | zscale | ) |
| zscale | Z Scale factor to apply to z coordinate (pt[i].z *= zscale) |
| ERRVALUE POLYLINE::Assign | ( | const DOUBLE_ARRAY< DPOINT3D > & | rhs, | |
| bool | closed = false | |||
| ) |
Assign point values from DOUBLE_ARRAY<DPOINT3D> buffer.
| closed | Create and maintain a closed polyline |
| ERRVALUE POLYLINE::Assign | ( | const DOUBLE_ARRAY< DPOINT2D > & | rhs, | |
| bool | closed = false, |
|||
| double | ZValue = 0.0 | |||
| ) |
Assign point values from DOUBLE_ARRAY<DPOINT2D> buffer.
| closed | Create and maintain a closed polyline |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| ERRVALUE POLYLINE::Assign | ( | const LPOINT2D * | rhs, | |
| int | NumPoints, | |||
| bool | closed = false, |
|||
| double | ZValue = 0.0 | |||
| ) |
Assign point values from SIMPLE_ARRAY<LPOINT2D> buffer.
| closed | Create and maintain a closed polyline |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| ERRVALUE POLYLINE::Assign | ( | const SIMPLE_ARRAY< LPOINT2D > & | rhs, | |
| bool | closed = false, |
|||
| double | ZValue = 0.0 | |||
| ) |
Assign point values from SIMPLE_ARRAY<LPOINT2D> buffer.
| closed | Create and maintain a closed polyline |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |