The POLYLINE class encapsulates a 2D or 3D polyline. More...
#include <mi32/polyline.h>
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... | |
Public Types | |
| enum | BUFFERSIDE { BUFFERSIDE_In = 1, BUFFERSIDE_Out = 2, BUFFERSIDE_Both = 3 } |
| 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 | |
| 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, DIMENSION dimension=DIMENSION_2D, double ZValue=0.0, UINT32 ReservePoints=1) | |
| POLYLINE () | |
| ~POLYLINE () | |
| ~SECTIONS () | |
| ~STRIPS () | |
| 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) |
| ERRVALUE | AssignFromXML (const XMLNODE *topnode) |
| 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) |
| int | Clip (const DRECT2D &ClipRect, DELEGATE_ERRVALUE_POLYLINE DelegateOnClip, 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 |
| ERRVALUE | ComputeBuffer (const double BufferDistance, POLYLINELIST &BufferLineList, const BUFFERSIDE BufferSide=BUFFERSIDE_Both) const |
| void | ComputeCentroid (DPOINT3D ¢) const |
| void | ComputeCentroid (DPOINT2D ¢) const |
| double | ComputeDistance (const POLYLINE &OtherLine, bool ExtentsOverlap=true) const |
| INT32 | ComputeDistPointAndVertexOnLine (double Distance, DPOINT3D &NewPoint, bool DistanceFromStart=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 |
| void | ComputeInteriorPoint (DPOINT3D &pt) 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 |
| INT32 | 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 *PointArray) const |
| ERRVALUE | ConvertToLong (SIMPLE_ARRAY< LPOINT2D > &PointArray) const |
| INT32 | ConvertToLongFloor (LPOINT2D *PointArray, const DPOINT2D &scale, const DPOINT2D &offset) const |
| INT32 | ConvertToLongFloor (LPOINT2D *PointArray) const |
| ERRVALUE | ConvertToLongFloor (SIMPLE_ARRAY< LPOINT2D > &PointArray) const |
| INT32 | ConvertToLongNearInt (LPOINT2D *PointArray) const |
| ERRVALUE | ConvertToLongNearInt (SIMPLE_ARRAY< LPOINT2D > &PointArray) const |
| INT32 | ConvertToLongRound (LPOINT2D *PointArray) const |
| ERRVALUE | ConvertToLongRound (SIMPLE_ARRAY< LPOINT2D > &PointArray) const |
| ERRVALUE | ConvertToLongRoundKeepDups (SIMPLE_ARRAY< LPOINT2D > &PointArray) const |
| void | DeleteVertex (int index) |
| void | Detach (MIDOUBLEARRAY &rhs) |
| void | DetachBuffer (MIDOUBLEARRAY &rhs) |
| void | DumpCoords (MISTRING &result, int indent, bool maxprec=false) const |
| CONST_ITERATOR | End () const |
| ITERATOR | End () |
| void | Exchange (POLYLINE &other) |
| 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 |
| const DRECT2D * | GetExtentsIfKnown () 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 | GetVertexX (INT32 index) const |
| double | GetVertexY (INT32 index) 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 |
| XMLNODE * | GetXML (XMLNODE *parentnode, const char *nodename=0) 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) |
| bool | RemoveColinearVertices (double thresh=0.0, bool KeepEndPoints=false) |
| void | RemoveDuplicates (double thresh=0.0, bool KeepEndPoints=false) |
| bool | RemoveDuplicateVertices (double thresh=0.0) |
| ERRVALUE | Replace (INT32 StartVertex, INT32 EndVertex, const POLYLINE &RepLine, INT32 RepLineStartVertex=0, INT32 RepLineEndVertex=INT32_MAX) |
| 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 | SetVertexX (INT32 index, double x) |
| void | SetVertexY (INT32 index, double y) |
| 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) |
| int | Union (POLYLINE &OperPoly, POLYLINELIST &PolyLineList, COMBINERESULT &CombineResult) |
| int | ValidatePolygon (CLIP &ClipTarget) const |
| int | ValidatePolygon (DELEGATE_ERRVALUE_POLYLINE DelegateOnValidated) const |
| int | ValidatePolygon () const |
The POLYLINE class encapsulates a 2D or 3D polyline.
POLYLINE strip information to improve performance of certain algorithms such as POLYLINE::IsPointInside().
POLYLINE section information to improve performance of certain algorithms such as POLYLINE::Conflate();.
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.
| typedef DOUBLE_ARRAY<SECTION> POLYLINE::SECTIONARRAY |
| enum POLYLINE::BUFFERSIDE |
Values returned for Union(), Intersect(), Subtract() and ExclusiveUnion().
| enum POLYLINE::COMPRESULT |
| enum POLYLINE::EXTRACT |
| enum POLYLINE::JOINTYPE |
| enum POLYLINE::SPLINE |
| enum POLYLINE::THINMETHOD |
| POLYLINE::POLYLINE | ( | ) |
Default constructor, creates empty unclosed 2D polyline.
| POLYLINE::POLYLINE | ( | bool | closed, | |
| DIMENSION | dimension = DIMENSION_2D, |
|||
| double | ZValue = 0.0, |
|||
| UINT32 | ReservePoints = 1 | |||
| ) | [explicit] |
Construct with specified attributes.
| 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] |
Constructor from DOUBLE_ARRAY<DPOINT3D>.
| closed | Create and maintain a closed polyline |
| 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 |
| void POLYLINE::Attach | ( | MIDOUBLEARRAY & | rhs, | |
| INT32 | NumPoints, | |||
| bool | closed = false, |
|||
| DIMENSION | dimension = DIMENSION_2D, |
|||
| double | ZValue = 0.0 | |||
| ) |
Attach a MIDOUBLEARRAY instance to 'this' by taking ownership of the MIDOUBLEARRAY buffer.
After this call, the MIDOUBLEARRAY buffer is no longer valid
| closed | Create and maintain a closed polyline | |
| dimension | Create a 2D or 3D line | |
| ZValue | Initial Z value for POLYLINE if NumDim != 3 |
| ITERATOR POLYLINE::Begin | ( | ) | [inline] |
| CONST_ITERATOR POLYLINE::Begin | ( | ) | const [inline] |
Return a CONST_ITERATOR that refers to the beginning of the POLYLINE.
| void POLYLINE::Clear | ( | ) |
Clear Strip information.
| void POLYLINE::Clear | ( | ) |
Clear Section information.
| void POLYLINE::Clear | ( | ) |
Clear POLYLINE of point data.
| void POLYLINE::ClearOptimizations | ( | ) |
Clear POLYLINE of all optimizations.
Clear POLYLINE of point data.
| EndPosn | Inclusive |
| int POLYLINE::Clip | ( | const DRECT2D & | ClipRect, | |
| CLIP & | ClipTarget, | |||
| CLIPMODE | ClipMode = CLIPMODE_Inside | |||
| ) |
Clip a polyline to a rectangle, call the ClipTarget for each segment.
| ClipRect | Rectangle to clip to | |
| ClipMode | Clipping mode |
| int POLYLINE::Clip | ( | const DRECT2D & | ClipRect, | |
| DELEGATE_ERRVALUE_POLYLINE | DelegateOnClip, | |||
| CLIPMODE | ClipMode = CLIPMODE_Inside | |||
| ) |
Clip a polyline to a rectangle, call delegate for each segment.
| ClipRect | Rectangle to clip to | |
| DelegateOnClip | Delegate to call for each clipped polyline |
| COMPRESULT POLYLINE::CompareLineToLine | ( | const POLYLINE & | OtherLine | ) | const |
Compare the two lines and return the result of the comparison.
Uses "Extent" and "Section" optimizations
| COMPRESULT POLYLINE::CompareLineToPolygon | ( | const DRECT2D & | rect | ) | const |
Compare the line against the polygon and return the result of the comparison.
Uses "Extent", "Section" and "Strip" optimizations
| COMPRESULT POLYLINE::CompareLineToPolygon | ( | const POLYLINE & | Polygon | ) | const |
Compare the line against the polygon and return the result of the comparison.
Uses "Extent", "Section" and "Strip" optimizations
| COMPRESULT POLYLINE::ComparePolygonToPolygon | ( | const POLYLINE & | OtherPoly | ) | const |
Compare the two polygons and return the result of the comparison.
Uses "Extent", "Section" and "Strip" optimizations
| double POLYLINE::ComputeAngle | ( | ) | const |
Compute the angle for the line using the sum of all the angles in the line.
| double POLYLINE::ComputeArea | ( | ) | const [inline] |
Find area of polygon if the line is closed This method assumes that the polygon is topologically correct (i.e.
it does not cross itself)
| ERRVALUE POLYLINE::ComputeBuffer | ( | const double | BufferDistance, | |
| POLYLINELIST & | BufferLineList, | |||
| const BUFFERSIDE | BufferSide = BUFFERSIDE_Both | |||
| ) | const |
Compute an buffer from the line using a buffer distance and a bufferside.
| void POLYLINE::ComputeCentroid | ( | DPOINT3D & | cent | ) | const |
Compute 3D centroid.
If closed, X/Y values will be same as for 2D and Z will be center of Z range.
| void POLYLINE::ComputeCentroid | ( | DPOINT2D & | cent | ) | const |
Compute 2D centroid of polygon or line.
This method assumes that the polygon is topologically correct (i.e. it does not cross itself)
| double POLYLINE::ComputeDistance | ( | const POLYLINE & | OtherLine, | |
| bool | ExtentsOverlap = true | |||
| ) | const |
Compute the shortest distance between the two lines.
If the lines cross, return zero. Uses "Section" optimization
| ExtentsOverlap | Set to false if the extents of the two lines DO NOT overlap. If set to 'false' this method does not need to check for segment intersections |
| INT32 POLYLINE::ComputeDistPointAndVertexOnLine | ( | double | Distance, | |
| DPOINT3D & | NewPoint, | |||
| bool | DistanceFromStart = true | |||
| ) | const |
Determine a point on the line given a distance from the start or end of the line.
| NewPoint | Computed point based on distance RETURNED |
| bool POLYLINE::ComputeDistPointOnLine | ( | double | Distance, | |
| DPOINT3D & | NewPoint, | |||
| bool | DistanceFromStart = true | |||
| ) | const |
Determine a point on the line given a distance from the start or end of the line.
| NewPoint | Computed point based on distance RETURNED |
Determine the extents of a sub-section of the line.
| EndVertex | Inclusive |
| void POLYLINE::ComputeExtents | ( | DRECT2D & | rect | ) | const |
Determine the extents of the line Uses and / or sets the "Extent" optimization.
Determine the extents of a sub-section of the line.
| EndVertex | Inclusive |
| void POLYLINE::ComputeExtents | ( | DRECT3D & | rect | ) | const |
Determine the extents of the line Uses and / or sets the "Extent" optimization.
| void POLYLINE::ComputeInteriorPoint | ( | DPOINT3D & | pt | ) | const |
Compute point on interior of polygon or on line if not closed.
| pt | Point returned |
| double POLYLINE::ComputeLength | ( | const DPOINT3D & | point | ) | const |
Determine length of the line to the point specified.
| point | Compute distance from start of line to point given |
| double POLYLINE::ComputeLength | ( | ) | const |
Determine length of the line.
| double POLYLINE::ComputeLongestSegmentLength | ( | ) | const |
Determine length of the longest segment of the line.
| double POLYLINE::ComputeMaxDimension | ( | ) | const |
Determine maximum length between two vertices on the polygon Uses the "Section" and "Extent" optimizations.
| void POLYLINE::ComputeMidPoint | ( | DPOINT3D & | MidPoint | ) | const |
Determine line mid-point.
| MidPoint | Computed mid-point RETURNED |
| ERRVALUE POLYLINE::ComputeOffset | ( | const SIMPLE_ARRAY< double > & | OffsetDistance, | |
| POLYLINE & | OffsetLine, | |||
| JOINTYPE | JoinType = JOINTYPE_Miter | |||
| ) | const |
Compute an offset from the line using a start distance, end distance and a join type.
Positive buffer distances will result in a buffer to the right of the line assuming Cartesian coordinates (+ right/up, - left/down)
| OffsetDistance | One entry for each vertex in the line, sign of each distance needs to be the same |
| ERRVALUE POLYLINE::ComputeOffset | ( | double | StartOffsetDistance, | |
| double | EndOffsetDistance, | |||
| POLYLINE & | OffsetLine, | |||
| JOINTYPE | JoinType = JOINTYPE_Miter | |||
| ) | const |
Compute an offset from the line using a start distance, end distance and a join type.
Positive buffer distances will result in a buffer to the right of the line assuming Cartesian coordinates (+ right/up, - left/down)
| ERRVALUE POLYLINE::ComputeOffset | ( | double | OffsetDistance, | |
| POLYLINE & | OffsetLine, | |||
| JOINTYPE | JoinType = JOINTYPE_Miter | |||
| ) | const |
Compute an offset from the line using a distance and a join type.
Positive buffer distances will result in a buffer to the right of the line assuming Cartesian coordinates (+ right/up, - left/down)
| ORIENTATION POLYLINE::ComputeOrientation | ( | ) | const [inline] |
Find orientation of polygon if the line is closed This method assumes that the polygon is topologically correct (i.e.
it does not cross itself)
| INT32 POLYLINE::ComputePercentPointOnLine | ( | double | Percent, | |
| DPOINT3D & | NewPoint, | |||
| bool | DistanceFromStart = true | |||
| ) | const |
Determine a point on the line given a percentage from the start or end of the line.
| Percent | Value between 0.0 and 1.0 | |
| NewPoint | Computed point based on distance RETURNED |
| ORIENTATION POLYLINE::ComputeStats | ( | double *const | area, | |
| DPOINT2D *const | centroid | |||
| ) | const |
Compute statistics for the polygon This method assumes that the polygon is topologically correct (i.e.
it does not cross itself)
| area | Area value RETURNED, NULL if not needed | |
| centroid | Centroid value RETURNED, NULL if not needed |
| ERRVALUE POLYLINE::Conflate | ( | POLYLINELIST & | LineList, | |
| double | thresh, | |||
| bool & | LineChanged, | |||
| BITSET_UNOWNED & | LineListSet | |||
| ) |
Conflate a set of POLYLINE's with the changed vertex priority assigned to the set.
If there is a change to be made to get the lines to match along a set of segments, the 'LineList' will be picked to change its points before 'this' will. Uses the "Section" and "Extent" optimizations
| LineListSet | Matches the 'LineList' and tells which lines have been changed |
| ERRVALUE POLYLINE::Conflate | ( | double | thresh, | |
| bool & | LineChanged | |||
| ) |
Conflate a POLYLINE to itself with the changed vertex priority assigned to the set.
If there is a change to be made to get the line to match along a set of segments, the higher number vertices will be picked to change. Uses the "Section" optimization
| ERRVALUE POLYLINE::ConvertForward | ( | const SPATREF::COORDOP & | Op | ) |
Convert point coordinates using generic transformation.
| void POLYLINE::ConvertForward | ( | const TRANS3D & | t3d | ) |
Convert point coordinates using 3D perspective transformation.
| ERRVALUE POLYLINE::ConvertForward | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation.
| void POLYLINE::ConvertForward | ( | const TRANS2D_AFFINE & | taf | ) |
Convert point coordinates using affine transformation.
| ERRVALUE POLYLINE::ConvertForwardDense | ( | const SPATREF::COORDOP & | Op, | |
| double | tolerance | |||
| ) |
Convert point coordinates using generic transformation with densification.
| ERRVALUE POLYLINE::ConvertForwardDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation with densification.
| void POLYLINE::ConvertInverse | ( | const TRANS3D & | t3d | ) |
Convert point coordinates using 3D perspective transformation.
| ERRVALUE POLYLINE::ConvertInverse | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation.
| void POLYLINE::ConvertInverse | ( | const TRANS2D_AFFINE & | taf | ) |
Convert point coordinates using affine transformation.
| ERRVALUE POLYLINE::ConvertInverseDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation with densification.
| ERRVALUE POLYLINE::ConvertReverse | ( | const SPATREF::COORDOP & | Op | ) |
Convert point coordinates using generic transformation.
| ERRVALUE POLYLINE::ConvertReverseDense | ( | const SPATREF::COORDOP & | Op, | |
| double | tolerance | |||
| ) |
Convert point coordinates using generic transformation with densification.
Convert polygon from double's to INT32's (no rounding), removes colinear points.
| ERRVALUE POLYLINE::ConvertToLong | ( | SIMPLE_ARRAY< LPOINT2D > & | PointArray | ) | const |
Convert polygon from double's to INT32's (no rounding), removes colinear points.
| INT32 POLYLINE::ConvertToLongFloor | ( | LPOINT2D * | PointArray, | |
| const DPOINT2D & | scale, | |||
| const DPOINT2D & | offset | |||
| ) | const |
Convert polygon from double's to INT32's with scaling and offset (floor method), removes colinear points.
| PointArray | Point array to contain result | |
| scale | Scaling factors | |
| offset | Offset values added after scaling |
Convert polygon from double's to INT32's (floor method), removes colinear points.
| ERRVALUE POLYLINE::ConvertToLongFloor | ( | SIMPLE_ARRAY< LPOINT2D > & | PointArray | ) | const |
Convert polygon from double's to INT32's (floor method), removes colinear points.
Convert polygon from double's to INT32's (NearInt truncating), removes colinear points.
| ERRVALUE POLYLINE::ConvertToLongNearInt | ( | SIMPLE_ARRAY< LPOINT2D > & | PointArray | ) | const |
Convert polygon from double's to INT32's (NearInt truncating), removes colinear points.
Convert polygon from double's to INT32's with rounding, removes colinear points.
| ERRVALUE POLYLINE::ConvertToLongRound | ( | SIMPLE_ARRAY< LPOINT2D > & | PointArray | ) | const |
Convert polygon from double's to INT32's with rounding, removes colinear points.
| ERRVALUE POLYLINE::ConvertToLongRoundKeepDups | ( | SIMPLE_ARRAY< LPOINT2D > & | PointArray | ) | const |
Convert polygon from double's to INT32's with rounding, keep colinear points.
| void POLYLINE::DeleteVertex | ( | int | index | ) |
Delete a line vertex If the line is a closed polygon and removing a vertex causes less than 4 vertices to remain, the line is opened.
| index | Remove a vertex from the line Index of vertex to remove |
| void POLYLINE::Detach | ( | MIDOUBLEARRAY & | rhs | ) |
Detach the MIDOUBLEARRAY from 'this' to 'rhs'. 'this' does not have control of the buffer after this call.
| void POLYLINE::DetachBuffer | ( | MIDOUBLEARRAY & | rhs | ) |
Detach the MIDOUBLEARRAY from 'this' to 'rhs'. 'this' is not usable until Attach() is called, if you try, your process will die.
| void POLYLINE::DumpCoords | ( | MISTRING & | result, | |
| int | indent, | |||
| bool | maxprec = false | |||
| ) | const |
Dump coordinates to string.
Though intended for debugging, not for serialization, the format is compatible with AssignFromXML when maximum precision is used.
| result | String to append to | |
| indent | Amount to indent each coordinate | |
| maxprec | Use maximum precision |
| CONST_ITERATOR POLYLINE::End | ( | ) | const [inline] |
Return a CONST_ITERATOR that refers to the end of the POLYLINE, not a valid point.
| ITERATOR POLYLINE::End | ( | ) | [inline] |
| void POLYLINE::Exchange | ( | POLYLINE & | other | ) |
Exchange two polylines.
All iterators associated with either polyline will become invalid.
| other | Other polyline to exchange with |
| ERRVALUE POLYLINE::ExclusiveUnion | ( | POLYLINE & | OperPoly, | |
| POLYLINELIST & | PolyLineList, | |||
| COMBINERESULT & | CombineResult | |||
| ) |
Exclusive Union (XOR) operator polygon with 'this' 'this' and 'PolyLineList' must be conflated using POLYLINE::Conflate() "PolyLineList" will contain ORIENTATION_Clockwise for shell polygons and ORIENTATION_CounterClockwise for islands.
| PolyLineList | Results of operation returned here |
Extract a portion of the line into a new line based on position and number of points.
| void POLYLINE::Extract | ( | POLYLINE & | NewLine, | |
| const DPOINT3D & | StartPoint, | |||
| const DPOINT3D & | EndPoint | |||
| ) | const |
Extract a portion of the line into a new line based on two point on the line.
| NewLine | Result of extraction | |
| StartPoint | Point to start extraction from | |
| EndPoint | Point to end extraction from |
| void POLYLINE::Extract | ( | POLYLINE & | NewLine, | |
| const DPOINT3D & | BasePoint, | |||
| double | Distance, | |||
| EXTRACT | ExtractPoint, | |||
| bool | ExtrudePastEnds = false | |||
| ) | const |
Extract a portion of the line into a new line based on a basepoint and distance from that basepoint.
| NewLine | Result of extraction | |
| BasePoint | Point to extract from based on "ExtractPoint" |
| double POLYLINE::FindClosestPoint | ( | const DPOINT3D & | point, | |
| double | MaximumDistance, | |||
| DPOINT3D & | retpt, | |||
| INT32 & | Vertex | |||
| ) | const |
Find closest point on the line (not necessarily at a vertex) to specified point.
This method uses linear interpolation to determine the correct z value. This method is faster than the above 'FindClosestPoint' methods because it will make less calls to DistPointLineSegD().
| point | Point to check | |
| MaximumDistance | Maximum distance allowed between point on the line and 'point' | |
| retpt | Point on line found RETURNED | |
| Vertex | Index of vertex BEFORE the location of the point RETURNED |
Find closest point on the line (not necessarily at a vertex) to specified point.
This method uses linear interpolation to determine the correct z value.
| point | Point to check | |
| retpt | Point on line found RETURNED |
Find closest point on the line (not necessarily at a vertex) to specified point.
| point | Point to check | |
| retpt | Point on line found RETURNED |
| int POLYLINE::FindClosestSegment | ( | const DPOINT2D & | point, | |
| double * | distance = 0 | |||
| ) | const |
Find closest segment to specified point.
| point | Point to check | |
| distance | Distance returned, 0 if don't need |
Find closest vertex to specified 3D point.
This method uses linear interpolation to determine the Z value.
| point | Point to check | |
| index | Index of closest vertex returned |
| int POLYLINE::FindClosestVertex | ( | const DPOINT2D & | point, | |
| double * | distance = 0 | |||
| ) | const |
Find closest vertex to specified 2D point.
| point | Point to check | |
| distance | Distance returned, 0 if don't need |
Find closest vertex to specified 2D point.
| point | Point to check | |
| index | Index of closest vertex returned |
| void POLYLINE::GenerateExtentOptimization | ( | ) | const |
Generate the "Extent" optimization.
Used mostly for Compare...() methods and to setup the "Stript" optimization
| void POLYLINE::GenerateExtentOptimization | ( | DRECT2D & | Extents | ) | const |
Generate the "Extent" optimization.
Used mostly for Compare...() methods and to setup the "Strip" optimization
| void POLYLINE::GenerateSectionOptimization | ( | INT32 | NumVertices = 64 |
) | const |
Generate the "Section" optimization.
Used for many methods. A "Section" is defined as piece of the source line (defined by "NumVertices") and that sections extents.
| ERRVALUE POLYLINE::GenerateSectionOptimization | ( | SECTIONS *& | Sections, | |
| INT32 | NumVertices = 64 | |||
| ) | const |
Generate the "Section" optimization.
Used for many methods. A "Section" is defined as piece of the source line (defined by "NumVertices") and that sections extents.
| Sections | Section information RETURNED, you must free pointer |
Generate the "Strip" optimization.
Used for IsPointInside() method. A "Strip" is defined as a list of segments that fall within a range of y values.
Generate the "Strip" optimization.
Used for IsPointInside() method. A "Strip" is defined as a list of segments that fall within a range of y values.
| Strips | Strip information RETURNED, you must free pointer |
| DIMENSION POLYLINE::GetDimension | ( | ) | const [inline] |
Get current line dimension.
| const DRECT2D* POLYLINE::GetExtentsIfKnown | ( | ) | const |
Get the extents of the POLYLINE if known, this method will NOT compute the extents.
| INT32 POLYLINE::GetNumPoints | ( | ) | const [inline] |
Get the number of points in the line.
| const POLYLINE::SECTIONARRAY& POLYLINE::GetSectionArray | ( | ) | const |
| ERRVALUE POLYLINE::GetStrip | ( | double | yinit, | |
| double | ylast, | |||
| SIMPLE_ARRAY< INT32_RANGE > & | Strip | |||
| ) | const |
Get a strip cooresponding to the y range.
| const SIMPLE_ARRAY<INT32_RANGE>& POLYLINE::GetStrip | ( | double | y | ) | const |
Get a strip cooresponding to the y coordinate of the point.
| void POLYLINE::GetTestPoint | ( | DPOINT3D & | pt | ) | const |
Get Test Point Obtains valid test point for the line, either the middle vertex or.
if a two point line, the midpoint
Get 2D vertex.
| double POLYLINE::GetVertexX | ( | INT32 | index | ) | const [inline] |
Get 'X' coordinate of a vertex.
| double POLYLINE::GetVertexY | ( | INT32 | index | ) | const [inline] |
Get 'Y' coordinate of a vertex.
| double POLYLINE::GetVertexZ | ( | INT32 | index | ) | const [inline] |
Get 'Z' coordinate of a vertex.
| ERRVALUE POLYLINE::GetVertices | ( | DOUBLE_ARRAY< DPOINT3D > & | vertices | ) | const |
Get vertices into DOUBLE_ARRAY<DPOINT3D> array.
| vertices | Vertices returned |
| ERRVALUE POLYLINE::GetVertices | ( | DOUBLE_ARRAY< DPOINT2D > & | vertices | ) | const |
Get vertices into DOUBLE_ARRAY<DPOINT2D> array.
| vertices | Vertices returned |
Get XML representation.
| parentnode | Parent node | |
| nodename | Node name, default will be "Polygon" or "Line" depending on whether closed or not |
| double POLYLINE::GetZValue | ( | ) | const [inline] |
Get polyline Z value, only useful for 2D lines.
| bool POLYLINE::HasSectionOptimization | ( | ) | const |
Does 'this' have strip optimization.
| bool POLYLINE::HasStripOptimization | ( | ) | const |
Does 'this' have strip optimization.
| int POLYLINE::Intersect | ( | POLYLINE & | OperPoly, | |
| POLYLINELIST & | PolyLineList, | |||
| COMBINERESULT & | CombineResult | |||
| ) |
Intersect operator polygon with 'this' "PolyLineList" will contain ORIENTATION_Clockwise for shell polygons and ORIENTATION_CounterClockwise for islands 'this' and 'PolyLineList' must be conflated using POLYLINE::Conflate().
| PolyLineList | Results of operation returned here |
| void POLYLINE::IntersectClean | ( | INTERSECTINFO & | IntsInfo | ) | const |
Remove redundant and overlapping intersection entries from INTERSECTINFO.
| ERRVALUE POLYLINE::IntersectSearch | ( | INTERSECTINFO & | IntsInfo, | |
| const POLYLINE & | OtherLine, | |||
| INTERSECTINFO * | OtherIntsInfo, | |||
| double | threshold | |||
| ) | const |
Search for intersections against another line.
Intersection information is stored in the INTERSECTINFO instance. If information already exists in the INTERSECTINFO, any new intersection information will be appended. Uses the "Section" and "Extent" optimizations
| OtherIntsInfo | Optional, used if you want to keep intersection info about OtherLine' |
| ERRVALUE POLYLINE::IntersectSearch | ( | INTERSECTINFO & | IntsInfo, | |
| double | threshold | |||
| ) | const |
Search for intersections against itself.
Intersection information is stored in the INTERSECTINFO Uses the "Section" and "Extent" optimizations
| ERRVALUE POLYLINE::IntersectSplitLine | ( | INTERSECTINFO & | IntsInfo, | |
| SPLIT & | SplitInfo, | |||
| double | threshold, | |||
| bool | CallBadSegment = false | |||
| ) | const |
Split the line according to the INTERSECTINFO information.
| SplitInfo | Callback base class for line splitting | |
| CallBadSegment | Set to true if an intersection causes invalid lines to be generated |
| bool POLYLINE::IsClosed | ( | ) | const [inline] |
Check if the line is marked closed.
| bool POLYLINE::IsEqual | ( | const POLYLINE & | rhs | ) | const |
Determine if the two lines are exactly equal This method uses "Exact" point comparisons.
| bool POLYLINE::IsEquivalentTo | ( | const POLYLINE & | rhs, | |
| double | threshold = 0.0 | |||
| ) | const |
Determine if the two lines are equivalent This method uses "Fuzzy" point comparisons and the direction of the lines are not relevant.
| bool POLYLINE::IsPointInside | ( | const DPOINT2D & | pt | ) | const |
Check if the point is inside the polygon Uses the "Strip" optimization if exists.
| pt | Point to check |
| bool POLYLINE::IsRectangle | ( | ) | const |
Returns true if the POLYLINE describes a simple, unrotated rectangle.
| bool POLYLINE::IsValid | ( | ) | const |
Has the strip list been computed?
| bool POLYLINE::IsValid | ( | ) | const |
Has the section list been computed?
| void POLYLINE::MoveVertex | ( | int | index, | |
| const DPOINT2D & | delta, | |||
| int | FixedVertex1 = -1, |
|||
| int | FixedVertex2 = -1 | |||
| ) |
Move a vertex by some dx,dy If FixedVertex1 and/or FixedVertex2 are specified, all points between the vertex being moved and the fixed verticies will also be moved by an ammount inversely proportional to their distance from the vertex being moved.
If you specify two fixed verticies, one had better be less than index and one greater than index or you will get weird results. Also, specifying a FixedVertex which is just index +/- 1 is the same as not specifying it.
| index | Vertex to move | |
| delta | Move distance | |
| FixedVertex1 | Vertex to keep in place | |
| FixedVertex2 | Vertex to keep in place |
Append 'rhs' to 'this' If both 'rhs' and 'this' have "Extents" optimization, this method update 'this' Extents optimization.
| STRIPS& POLYLINE::operator= | ( | const STRIPS & | rhs | ) |
| SECTIONS& POLYLINE::operator= | ( | const SECTIONS & | rhs | ) |
Assignment Will keep any optimizations associated with "rhs" If POLYLINE::Reserved() was called on 'this' to pre-allocate the point buffer, do not call this method, call POLYLINE::operator+=() or POLYLINE::Append().
| bool POLYLINE::RemoveColinearVertices | ( | double | thresh = 0.0, |
|
| bool | KeepEndPoints = false | |||
| ) |
Remove colinear and duplicate vertices along the line.
| thresh | Threshold value to test for same point or colinear point |
| void POLYLINE::RemoveDuplicates | ( | double | thresh = 0.0, |
|
| bool | KeepEndPoints = false | |||
| ) |
Remove duplicate and colinear points along the line.
| thresh | Threshold value to test for same point or colinear point |
| bool POLYLINE::RemoveDuplicateVertices | ( | double | thresh = 0.0 |
) |
Remove duplicate vertices along the line.
| thresh | Threshold value to test for same point |
| ERRVALUE POLYLINE::Replace | ( | INT32 | StartVertex, | |
| INT32 | EndVertex, | |||
| const POLYLINE & | RepLine, | |||
| INT32 | RepLineStartVertex = 0, |
|||
| INT32 | RepLineEndVertex = INT32_MAX | |||
| ) |
Replace a section of 'this' with a section of 'RepLine'.
| EndVertex | Inclusive |
Reserve space for given number of points The POLYLINE::operator=() will not use the reserved buffer, call POLYLINE::Clear() then POLYLINE::operator+=() or POLYLINE::Append() to use the reserved buffer.
| void POLYLINE::Reverse | ( | ) |
Reverse the vertices of the line This method will retain the "Extents" and "Orientation" optimizations.
| POLYLINE::SECTIONS | ( | const SECTIONS & | rhs | ) |
| POLYLINE::SECTIONS | ( | ) |
| void POLYLINE::SetClosed | ( | bool | closed | ) |
Close or open the line Will add closure point if set to 'true'.
| void POLYLINE::SetOrientation | ( | ORIENTATION | Orientation | ) |
Set polygon orientation Uses the "Orientation" optimization.
| void POLYLINE::SetPrecision | ( | int | Precision | ) |
Set the precision of the coordinates in the POLYLINE 'Precision' is the number of decimal places to keep, '0' for precision of whole numbers, < '0' for the left of the decimal point, > '0' for right of the decimal point.
| void POLYLINE::SetSectionArray | ( | const POLYLINE::SECTIONARRAY & | SectionArray | ) |
| void POLYLINE::SetupExtentOptimization | ( | const DRECT2D & | Extents | ) | const |
Setup the "Extent" optimization.
Used mostly for Compare...() methods and to setup the "Strip" optimization
| void POLYLINE::SetupOrientationOptimization | ( | ORIENTATION | Orientation | ) | const |
Setup the "Orientation" optimization.
Used mostly for SetOrientation(), Intersect(), Union(), Subtract(), and ExclusiveUnion() methods
| void POLYLINE::SetupSectionOptimization | ( | const SECTIONS & | Sections | ) | const |
Setup the "Section" optimization.
Used for many methods. A "Section" is defined as piece of the source line (defined by "NumVertices") and that sections extents.
| Sections | Sections from GenerateSectionOptimization() |
| void POLYLINE::SetupStripOptimization | ( | const STRIPS & | Strips | ) | const |
Setup the "Strip" optimization.
Used for IsPointInside() method. A "Strip" is defined as a list of segments that fall within a range of y values.
Set a vertex on the line to a specified 3D point.
| index | Vertex to set | |
| pt | Point to set vertex to |
Set a vertex on the line to a specified 2D point.
| index | Vertex to set | |
| pt | Point to set vertex to |
| void POLYLINE::SetVertexX | ( | INT32 | index, | |
| double | x | |||
| ) |
Set X coordinate for specified vertex.
| index | Vertex to set | |
| x | 'X' coordinate to set vertex to |
| void POLYLINE::SetVertexY | ( | INT32 | index, | |
| double | y | |||
| ) |
Set Y coordinate for specified vertex.
| index | Vertex to set | |
| y | 'Y' coordinate to set vertex to |
| void POLYLINE::SetVertexZ | ( | INT32 | index, | |
| double | z | |||
| ) |
Set Z coordinate for specified vertex.
| index | Vertex to set | |
| z | 'Z' coordinate to set vertex to |
| void POLYLINE::SetZValue | ( | double | ZValue | ) | [inline] |
Set polyline Z value, only useful for 2D lines.
| void POLYLINE::Spline | ( | SPLINE | SplineType, | |
| INT32 | NumKnots, | |||
| double | tolerance, | |||
| SPLINEFLAGS | flags = SPLINEFLAG_None | |||
| ) |
Spline the line according to the SPLINE.
| NumKnots | Number of points between points (Bezier - Number of points in the line) |
| void POLYLINE::SplineZ | ( | SPLINE | SplineType, | |
| INT32 | NumKnots, | |||
| double | tolerance, | |||
| SPLINEFLAGS | flags = SPLINEFLAG_None | |||
| ) |
Spline the line using (distance, z) ordering according to the SPLINE. Used to spline the z values of a line.
| NumKnots | Number of points between points (Bezier - Number of points in the line) |
| void POLYLINE::Straighten | ( | ) |
Take the first and last points in the line and make a two point line from them.
| POLYLINE::STRIPS | ( | const STRIPS & | rhs | ) |
| POLYLINE::STRIPS | ( | ) |
| int POLYLINE::Subtract | ( | POLYLINE & | OperPoly, | |
| POLYLINELIST & | PolyLineList, | |||
| COMBINERESULT & | CombineResult | |||
| ) |
Subtract operator polygon from 'this' "PolyLineList" will contain ORIENTATION_Clockwise for shell polygons and ORIENTATION_CounterClockwise for islands 'this' and 'PolyLineList' must be conflated using POLYLINE::Conflate().
| PolyLineList | Results of operation returned here |
| void POLYLINE::Thin | ( | THINMETHOD | Method, | |
| double | Factor | |||
| ) |
Thin the line points based on method and factor.
| void POLYLINE::TransferOwnerFrom | ( | DOUBLE_ARRAY< DPOINT3D > & | rhs | ) |
Transfer polyline data ownership from the DOUBLE_ARRAY<> to itself.
| rhs | Point list to transfer ownership from |
| void POLYLINE::TransferOwnerFrom | ( | DOUBLE_ARRAY< DPOINT2D > & | rhs | ) |
Transfer polyline data ownership from the DOUBLE_ARRAY<> to itself.
| rhs | Point list to transfer ownership from |
| void POLYLINE::TransferOwnerTo | ( | DOUBLE_ARRAY< DPOINT3D > & | rhs | ) |
Transfer polyline data ownership from itself to the DOUBLE_ARRAY<>.
| rhs | Point list to transfer ownership to |
| void POLYLINE::TransferOwnerTo | ( | DOUBLE_ARRAY< DPOINT2D > & | rhs | ) |
Transfer polyline data ownership from itself to the DOUBLE_ARRAY<>.
| rhs | Point list to transfer ownership to |
| int POLYLINE::Union | ( | POLYLINE & | OperPoly, | |
| POLYLINELIST & | PolyLineList, | |||
| COMBINERESULT & | CombineResult | |||
| ) |
Union (ADD) operator polygon to 'this' "PolyLineList" will contain ORIENTATION_Clockwise for shell polygons and ORIENTATION_CounterClockwise for islands 'this' and 'PolyLineList' must be conflated using POLYLINE::Conflate().
| PolyLineList | Results of operation returned here |
| int POLYLINE::ValidatePolygon | ( | CLIP & | ClipTarget | ) | const |
Validate that the polygon does not intersect itself, resolve intersections if needed and call ClipTarget for each resulting validated polygon.
| ClipTarget | Target for resulting validated polygon, will be called for original polygon if already valid |
| int POLYLINE::ValidatePolygon | ( | DELEGATE_ERRVALUE_POLYLINE | DelegateOnValidated | ) | const |
Validate that the polygon does not intersect itself, resolve intersections if needed and call delegate for each resulting validated polygon.
| DelegateOnValidated | Delegate to call for each validated polygon, will be called for original polygon if already valid |
| int POLYLINE::ValidatePolygon | ( | ) | const |
Validate that the polygon does not intersect itself.
1.6.1