xmsgrid  1.0
xms::GmPolyLinePtRedistributerImpl Class Reference

Implementation of GmPolyLinePtRedistributer. More...

Inheritance diagram for xms::GmPolyLinePtRedistributerImpl:
xms::GmPolyLinePtRedistributer

Public Member Functions

virtual VecPt3d Redistribute (const VecPt3d &a_input, double a_size) override
 Redistributes the distance between points on a polyline based on the a_size value provided to the method. More...
 
double PolyLineLengths (const VecPt3d &a_pts, VecDbl &a_lengths)
 Calculates the total length (xy) of a polyline as well as the length of each segment. More...
 
VecPt3d RedistPolyLineWithNumSeg (const VecPt3d &a_pts, double a_totalLength, const VecDbl &a_lengths, int a_nSeg)
 Calculates the total length (xy) of a polyline as well as the length of each segment. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from xms::GmPolyLinePtRedistributer
static BSHP< GmPolyLinePtRedistributerNew ()
 Creates an instance of this class. More...
 

Detailed Description

Implementation of GmPolyLinePtRedistributer.

Definition at line 41 of file GmPolyLinePtRedistributer.cpp.

Member Function Documentation

◆ PolyLineLengths()

double xms::GmPolyLinePtRedistributerImpl::PolyLineLengths ( const VecPt3d a_pts,
VecDbl a_lengths 
)

Calculates the total length (xy) of a polyline as well as the length of each segment.

Parameters
[in]a_ptsThe point locations of the polyline.
[out]a_lengthsThe length of each segment of the polyline.
Returns
The length

Definition at line 101 of file GmPolyLinePtRedistributer.cpp.

References Mdist(), xms::Pt3< T >::x, and xms::Pt3< T >::y.

Referenced by Redistribute().

◆ RedistPolyLineWithNumSeg()

VecPt3d xms::GmPolyLinePtRedistributerImpl::RedistPolyLineWithNumSeg ( const VecPt3d a_pts,
double  a_totalLength,
const VecDbl a_lengths,
int  a_nSeg 
)

Calculates the total length (xy) of a polyline as well as the length of each segment.

Parameters
[in]a_ptsThe point locations of the polyline.
[in]a_totalLengthThe total length of the polyline.
[in]a_lengthsThe length of each segment of the polyline.
[in]a_nSegThe number of segments for the new polyline.
Returns
The new polyline

Definition at line 122 of file GmPolyLinePtRedistributer.cpp.

References xms::Pt3< T >::x, and xms::Pt3< T >::y.

Referenced by Redistribute().

◆ Redistribute()

VecPt3d xms::GmPolyLinePtRedistributerImpl::Redistribute ( const VecPt3d a_polyLines,
double  a_size 
)
overridevirtual

Redistributes the distance between points on a polyline based on the a_size value provided to the method.

Parameters
[in]a_polyLinesPoint locations defining the polylines.
[in]a_sizeTarget distance between points on the polyline.
Returns
2d vector of redistributed point locations.

Definition at line 84 of file GmPolyLinePtRedistributer.cpp.

References PolyLineLengths(), RedistPolyLineWithNumSeg(), and XM_ENSURE_TRUE.

Referenced by GmPolyLinePtRedistributerUnitTests::testRedistribute(), and GmPolyLinePtRedistributerUnitTests::testRedistribute1().


The documentation for this class was generated from the following file: