POLYLINE Class Reference

The POLYLINE class encapsulates a 2D or 3D polyline. More...

#include <mi32/polyline.h>

List of all members.

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< SECTIONSECTIONARRAY
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 &cent) 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 (MILIST< POLYLINE > &LineList, double thresh, bool &LineChanged, BITSET_UNOWNED &LineListSet)
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, MILIST< POLYLINE > &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::SECTIONARRAYGetSectionArray () 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 DPOINT2DGetVertex (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, MILIST< POLYLINE > &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)
POLYLINEoperator+= (const POLYLINE &rhs)
STRIPS & operator= (const STRIPS &rhs)
SECTIONS & operator= (const SECTIONS &rhs)
POLYLINEoperator= (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 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, MILIST< POLYLINE > &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, MILIST< POLYLINE > &PolyLineList, COMBINERESULT &CombineResult)
int ValidatePolygon (CLIP &ClipTarget) const
 ~POLYLINE ()
 ~SECTIONS ()
 ~STRIPS ()


Detailed Description

The POLYLINE class encapsulates a 2D or 3D polyline.

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 345 of file polyline.h.


Member Typedef Documentation

typedef DOUBLE_ARRAY<SECTION> POLYLINE::SECTIONARRAY
 

GENERATING_DOXYGEN_OUTPUT.

Definition at line 618 of file polyline.h.


Member Enumeration Documentation

enum POLYLINE::COMBINERESULT
 

Values returned for Union(), Intersect(), Subtract() and ExclusiveUnion().

Enumeration values:
COMBINERESULT_Disjoint  Polygons are disjoint.
COMBINERESULT_OperInsideSrc  Operator polygon inside source polygon, may share border point(s).
COMBINERESULT_SrcInsideOper  Source polygon inside operator polygon, may share border point(s).
COMBINERESULT_Equal  Source polygon equals operator polygon.
COMBINERESULT_Intersect  Source and operator polygons intersect.
COMBINERESULT_ClipOutside 
COMBINERESULT_ClipInside 
COMBINERESULT_SrcInside 

Definition at line 356 of file polyline.h.

enum POLYLINE::COMPRESULT
 

Enumeration values:
COMPRESULT_Outside  Both elements are outside of each other.
COMPRESULT_Inside  One element is completely inside the other.
COMPRESULT_Intersect  Both elements intersect.
COMPRESULT_Overlap  One element overlaps the other.

Definition at line 348 of file polyline.h.

enum POLYLINE::EXTRACT
 

Enumeration values:
EXTRACT_StartPoint 
EXTRACT_CenterPoint 
EXTRACT_EndPoint 

Definition at line 368 of file polyline.h.

enum POLYLINE::JOINTYPE
 

Enumeration values:
JOINTYPE_Miter 
JOINTYPE_Round 
JOINTYPE_Bevel 

Definition at line 374 of file polyline.h.

enum POLYLINE::SPLINE
 

Enumeration values:
SPLINE_NoSpline 
SPLINE_Cubic 
SPLINE_Quadratic 
SPLINE_Bezier 

Definition at line 387 of file polyline.h.

enum POLYLINE::SPLINEFLAGS
 

Enumeration values:
SPLINEFLAG_None 
SPLINEFLAG_DontMoveEnds 
SPLINEFLAG_UseMinDistance 
SPLINEFLAG_TreatAsClosed 

Definition at line 380 of file polyline.h.

enum POLYLINE::THINMETHOD
 

Enumeration values:
THINMETHOD_MinRatio 
THINMETHOD_Minimum 
THINMETHOD_Douglas 

Definition at line 394 of file polyline.h.


Constructor & Destructor Documentation

POLYLINE::POLYLINE bool  closed = false,
DIMENSION  dimension = DIMENSION_2D,
double  ZValue = 0.0,
UINT32  ReservePoints = 1
 

Default constructor.

Parameters:
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]
 

Constructor from DRECT2D, sets closed flag Sets "Extents" optimization.

Parameters:
rect  DRECT2D to create a line from
ZValue  Initial Z value for POLYLINE if NumDim != 3

POLYLINE::POLYLINE const DRECT3D rect  )  [explicit]
 

Constructor from DRECT3D, sets closed flag Sets "Extents" optimization.

Parameters:
rect  DRECT3D to create a line from

POLYLINE::POLYLINE const DPOLYGON dpoly,
bool  closed = false,
DIMENSION  dimension = DIMENSION_2D,
double  ZValue = 0.0
[explicit]
 

Constructor from legacy DPOLYGON.

Parameters:
dpoly  Legacy DPOLYGON to create a line from
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 DPOINT2D pts,
INT32  NumPoints,
bool  closed = false,
DIMENSION  dimension = DIMENSION_2D,
double  ZValue = 0.0
 

Constructor from DPOINT2D array and number of points.

Parameters:
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 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<>.

Parameters:
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>.

Parameters:
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>.

Parameters:
closed  Create and maintain a closed polyline
ZValue  Initial Z value for POLYLINE if NumDim != 3

POLYLINE::POLYLINE const LPOINT2D points,
INT32  NumPoints,
bool  closed = false,
double  ZValue = 0.0
[explicit]
 

Constructor from an array of LPOINT2D.

Parameters:
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>.

Parameters:
closed  Create and maintain a closed polyline

POLYLINE::POLYLINE const POLYLINE rhs  ) 
 

Copy constructor Will use any optimizations associated with "rhs".

POLYLINE::POLYLINE const POLYLINE rhs,
INT32  StartVertex,
INT32  EndVertex
 

Section copy constructor NO optimizations associated with "rhs" will be used.

Parameters:
rhs  POLYLINE to copy from
StartVertex  Start vertex of 'rhs
EndVertex  End vertex of 'rhs' (Inclusive)

POLYLINE::~POLYLINE  ) 
 

Destructor.

POLYLINE::~SECTIONS  ) 
 

POLYLINE::~STRIPS  ) 
 


Member Function Documentation

ERRVALUE POLYLINE::AddVertex const DPOINT3D point,
INT32  index = -1
 

Add a vertex to the line.

Parameters:
point  Point to add
index  Default location is the end of the line

ERRVALUE POLYLINE::AddVertex const DPOINT2D point,
INT32  index = -1
 

Add a vertex to the line.

Parameters:
point  Point to add
index  Default location is the end of the line

ERRVALUE POLYLINE::Append const POLYLINE rhs,
bool  RemovePoints = true
 

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  ) 
 

Parameters:
zscale  Z Scale factor to apply to z coordinate (pt[i].z *= zscale)

ERRVALUE POLYLINE::Assign const DRECT3D rect  ) 
 

Assign point values from a DRECT3D.

Parameters:
rect  DRECT2D to crete a line from

ERRVALUE POLYLINE::Assign const DRECT2D rect,
double  ZValue = 0.0
 

Assign point values from a DRECT2D.

Parameters:
rect  DRECT2D to crete a line from
ZValue  Initial Z value for POLYLINE

ERRVALUE POLYLINE::Assign const DOUBLE_ARRAY< DPOINT3D > &  rhs,
bool  closed = false
 

Assign point values from DOUBLE_ARRAY<DPOINT3D> buffer.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
closed  Create and maintain a closed polyline
ZValue  Initial Z value for POLYLINE if NumDim != 3

ERRVALUE POLYLINE::Assign const DPOINT2D pts,
INT32  NumPoints,
bool  closed = false,
DIMENSION  dimension = DIMENSION_2D,
double  ZValue = 0.0
 

Assign point values from DPOINT2D array and number of points.

Parameters:
closed  Create and maintain a closed polyline
dimension  Create a 2D or 3D line
ZValue  Initial Z value for POLYLINE if NumDim != 3

ERRVALUE POLYLINE::Assign const DPOLYGON dpoly,
bool  closed = false,
DIMENSION  dimension = DIMENSION_2D,
double  ZValue = 0.0
 

Assign point values from legacy DPOLYGON structure.

Parameters:
closed  Create and maintain a closed polyline
dimension  Create a 2D or 3D line
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

Parameters:
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]
 

Return an ITERATOR that refers to the beginning of the POLYLINE.

Definition at line 822 of file polyline.h.

CONST_ITERATOR POLYLINE::Begin  )  const [inline]
 

Return a CONST_ITERATOR that refers to the beginning of the POLYLINE.

Definition at line 818 of file polyline.h.

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.

void POLYLINE::ClearPoints INT32  StartPosn = 0,
INT32  EndPosn = INT32_MAX
 

Clear POLYLINE of point data.

Parameters:
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 Uses the "Extent" optimization.

Returns:
TRUE if part of the line is inside the clipping area, FALSE if not, < 0 error

COMPRESULT POLYLINE::CompareLineToLine const POLYLINE OtherLine  )  const
 

Compare the two lines and return the result of the comparison.

Uses "Extent" and "Section" optimizations

Returns:
COMPRESULT depending on the relationship of 'OtherLine' to 'this'

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

Returns:
COMPRESULT depending on the relationship of 'Polygon' to 'this'

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

Returns:
COMPRESULT depending on the relationship of 'Polygon' to 'this'

COMPRESULT POLYLINE::ComparePolygonToPolygon const POLYLINE OtherPoly  )  const
 

Compare the two polygons and return the result of the comparison.

Uses "Extent", "Section" and "Strip" optimizations

Returns:
COMPRESULT depending on the relationship of 'OtherPoly' to 'this'

double POLYLINE::ComputeAngle  )  const
 

Compute the angle for the line using the sum of all the angles in the line.

Returns:
Angle summation of the angles between segments