xmsinterp  1.0
xms::LineParameters Struct Reference

2D Line definition. If vertical m_slope is Nan. More...

#include <AnisotropicInterpolator.h>

Public Member Functions

 LineParameters (double a_slope, double a_intercept)
 Constructor from slope and intercept. More...
 
LineParameters NormalThrough (const Pt3d &a_p) const
 Get the LineParameters for a line normal to this through a point. More...
 
bool Intersection (const LineParameters &a_other, Pt3d &a_p) const
 Get the intersection point of this and another line. More...
 

Public Attributes

double m_slope
 Slope of the line. 0 is horizontal. Nan is vertical.
 
double m_intercept
 x intercept if vertical; else, the y intercept.
 

Detailed Description

2D Line definition. If vertical m_slope is Nan.

Definition at line 54 of file AnisotropicInterpolator.h.

Constructor & Destructor Documentation

◆ LineParameters()

xms::LineParameters::LineParameters ( double  a_slope,
double  a_intercept 
)

Constructor from slope and intercept.

Constructor.

Parameters
[in]a_slopeThe slope. Use kVERTICAL for vertical lines.
[in]a_interceptThe y intercept (or x intercept for vertical).
[in]a_slopeThe slope of the line. Use kVERTICAL for vertical lines.
[in]a_interceptThe x intercept if vertical; else, the y intercept.

Definition at line 45 of file AnisotropicInterpolator.cpp.

Member Function Documentation

◆ Intersection()

bool xms::LineParameters::Intersection ( const LineParameters a_other,
Pt3d a_p 
) const

Get the intersection point of this and another line.

Compute the intersection point of this line with another.

Parameters
[in]a_otherThe other line.
[out]a_pThe intersection point.
Returns
false if the lines are parallel so there is no intersection.
Parameters
[in]a_otherThe other line's definition.
[out]a_pThe intersection point (if any)
Returns
True if there is an intersection. False if the lines are parallel.

Definition at line 76 of file AnisotropicInterpolator.cpp.

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

Referenced by xms::AnisotropicInterpolator::GetIntersectionOfSegmentWithPoint().

◆ NormalThrough()

LineParameters xms::LineParameters::NormalThrough ( const Pt3d a_p) const

Get the LineParameters for a line normal to this through a point.

Return the parameters for a line normal to this one through a point.

Parameters
[in]a_pThe point the normal is to run through.
Returns
LineParameters for the line normal to this through a_p.
Parameters
[in]a_pThe point through which the normal line will contain.

Definition at line 55 of file AnisotropicInterpolator.cpp.

References xms::kVERTICAL.

Referenced by xms::AnisotropicInterpolator::GetIntersectionOfSegmentWithPoint().


The documentation for this struct was generated from the following files: