38 SNResult(
size_t a_index,
double a_param,
double a_cross,
const Pt3d& a_position)
97 const VecPt3d& a_interpolationPts,
98 bool a_pickClosest =
false);
102 const VecPt3d& a_interpolationPoints,
104 double a_IDWPower = 2,
105 double a_tol = 1.0e-5);
117 const Pt3d& a_target,
119 double a_tol = 1.0e-5);
129 Pt3d& a_intersection,
130 double& a_param)
const;
VecDbl m_accLengths
The accumulated distance along the centerline of each point.
VecPt3d m_centerLinePts
The polyline representing the centerline.
double InterpolatePoint(const Pt3d &a_target, const VecPt3d &a_interpolationPoints, double a_xScale, double a_IDWPower=2, double a_tol=1.0e-5)
Interpolate the z coordinate of the interpolation points to point a_target.
LineParameters GetLineParameters(const Pt3d &a_p0, const Pt3d &a_p1) const
Compute the 2d slope and intercept for a line through two points.
std::vector< double > VecDbl
bool GetIntersectionOfSegmentWithPoint(size_t a_segmentIndex, const Pt3d &a_p, Pt3d &a_intersection, double &a_param) const
Get the intersecting point and its parameter of a line through point a_p normal to a segment of m_cen...
size_t m_index
index of the segment within the centerline polyline
bool Intersection(const LineParameters &a_other, Pt3d &a_p) const
Get the intersection point of this and another line.
VecPt3d TransformPoint(const Pt3d &a_p, bool a_onlyClosest=false)
Transforms a point from (x, y, z) to (s, n, z) coordinates. s is for station (distance along the cent...
double CalculateIDW(double a_xScale, const VecPt3d &a_points, const Pt3d &a_target, double a_power, double a_tol=1.0e-5)
Calculates the Inverse Distance Weighted interpolation of a set of points at a target point...
AnisotropicInterpolator()
Constructor.
VecPt3d m_SNPoints
The interpolation points.
VecPt3d ComputeInterpolationPoints(const VecPt3d &a_interpolationPts, bool a_pickClosest)
Transforms a set of points from normal (x, y, z) coordinates to (s, n, z) coordinates. Note: The z coordinate is left unchanged.
LineParameters NormalThrough(const Pt3d &a_p) const
Get the LineParameters for a line normal to this through a point.
double CrossProduct(size_t a_segmentIndex, const Pt3d &a_p) const
Compute the 2d cross product of the vectors from a_p to the 1st and last points in a segment of m_cen...
Hold data of transforming from xyz to station,normal space.
double AnisotropicDistanceSquared(const Pt3d &a_p0, const Pt3d &a_p1, double a_xScale)
Compute the distance squared between two points, after a scale factor is applied to their x coordinat...
void SetPoints(const VecPt3d &a_centerlinePts, const VecPt3d &a_interpolationPts, bool a_pickClosest=false)
Set the centerline points to parameterize to.
const VecPt3d & GetInterpolationPoints() const
Get the transformed interpolation points in (s, n, z) space.
SNResult(size_t a_index, double a_param, double a_cross, const Pt3d &a_position)
Construct a station normal result.
std::vector< SNResult > VecSNResult
A Vector of station normal results (for a given point).
Class to transform points relative to a centerline polyline into a space where the centerline segment...
double Distance(const Pt3d &a_p0, const Pt3d &a_p1) const
Compute the distance between two points.
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
double GetParameterInSegment(size_t a_segmentIndex, const Pt3d &a_p) const
Compute the parameter for a point in a segment of m_centerLinePts. The parameter will be between 0 an...
LineParameters(double a_slope, double a_intercept)
Constructor from slope and intercept.
void GetNormalPointParameter(size_t a_segmentIndex, const Pt3d &a_p, double &a_lastParam, VecSNResult &a_results) const
Append the transform (if any) of a point to a centerline segment.
Pt3d m_position
intersection of the normal through point in the segment
double m_param
parameter in the range [0..1] within the segment
double m_slope
Slope of the line. 0 is horizontal. Nan is vertical.
void GetAllNormalPointParameters(const Pt3d &a_p, VecSNResult &a_results)
Get the SNResults for a point.
double m_intercept
x intercept if vertical; else, the y intercept.
std::vector< LineParameters > m_lineParams
std::vector< Pt3d > VecPt3d
2D Line definition. If vertical m_slope is Nan.
double m_cross
cross product (>0 if on left of segment; <0 on right)