xmsstamper  1.0
xms::XmStampInterpCrossSectionImpl Class Reference

Implementaion of XmStampInterpCrossSection. More...

Inheritance diagram for xms::XmStampInterpCrossSectionImpl:
xms::XmStampInterpCrossSection

Public Member Functions

virtual void InterpMissingCrossSections (XmStamperIo &a_) override
 Interpolates the missing cross sections. Modifys the m_cs member of the XmStamperIo class that is passed to this method. More...
 
virtual bool ValidCrossSectionsExist (XmStamperIo &a_) override
 Interpolates the missing cross sections. Modifys the m_cs member of the XmStamperIo class that is passed to this method. More...
 
virtual void InterpCs (XmStampCrossSection &a_prev, XmStampCrossSection &a_next, double a_percent, XmStampCrossSection &a_cs) override
 Interpolates a cross section from 2 other cross sections using a weight (a_percent) More...
 
int FindFirstValidCrossSection ()
 Finds the first valid cross section in the inputs. More...
 
int FindLastValidCrossSection ()
 Finds the last valid cross section in the inputs. More...
 
int FindNextValidCrossSection (int a_idx)
 Finds the first valid cross section after a_idx in the inputs. More...
 
void InterpCs (int a_prev, int a_next, double a_percent, XmStampCrossSection &a_cs)
 Interpolates a cross section from 2 other cross sections using a weight (a_percent) More...
 
void InterpPts (VecPt3d &a_v1, int a_beg1, int a_end1, VecPt3d &a_v2, int a_beg2, int a_end2, double a_percent, VecPt3d &a_interpPts)
 Interpolates part of 2 cross sections to part of a new cross section. Separate interpolations are done for the cross section between the center line and the shoulder and then from the shoulder to boundary of the cross section. More...
 
void CalcTvals (VecPt3d &a_v, int a_beg, int a_end, VecDbl &a_t)
 Calculates parametric t values from a vector of x,y coords based on x. More...
 
Pt3d PtFromT (VecPt3d &a_v, int a_beg, VecDbl &a_t, double a_tval)
 Calculates the x,y location of the point at a_tval. More...
 

Public Attributes

BSHP< Observerm_observer
 progress observer
 
XmStamperIom_io
 pointer to the inputs to the stamp operation
 

Additional Inherited Members

- Static Public Member Functions inherited from xms::XmStampInterpCrossSection
static BSHP< XmStampInterpCrossSectionNew ()
 Creates a XmStampInterpCrossSection class. More...
 

Detailed Description

Implementaion of XmStampInterpCrossSection.

Definition at line 44 of file XmStampInterpCrossSection.cpp.

Member Function Documentation

◆ CalcTvals()

void xms::XmStampInterpCrossSectionImpl::CalcTvals ( VecPt3d a_v,
int  a_beg,
int  a_end,
VecDbl a_t 
)

Calculates parametric t values from a vector of x,y coords based on x.

Parameters
[in]a_vvector of x,y
[in]a_begIndex to the start of the section of a_v
[in]a_endIndex to the end of the section of a_v
[out]a_tVector of calculated t values

Definition at line 339 of file XmStampInterpCrossSection.cpp.

Referenced by InterpPts().

◆ FindFirstValidCrossSection()

int xms::XmStampInterpCrossSectionImpl::FindFirstValidCrossSection ( )

Finds the first valid cross section in the inputs.

Returns
The index to the first valid cross section in the inputs. -1 is returned if no valid cross sections exist.

Definition at line 171 of file XmStampInterpCrossSection.cpp.

References FindNextValidCrossSection().

Referenced by InterpMissingCrossSections(), and ValidCrossSectionsExist().

◆ FindLastValidCrossSection()

int xms::XmStampInterpCrossSectionImpl::FindLastValidCrossSection ( )

Finds the last valid cross section in the inputs.

Returns
The index to the last valid cross section in the inputs. -1 is returned if no valid cross sections exist.

Definition at line 180 of file XmStampInterpCrossSection.cpp.

References xms::XmStamperIo::m_cs, and m_io.

Referenced by InterpMissingCrossSections().

◆ FindNextValidCrossSection()

int xms::XmStampInterpCrossSectionImpl::FindNextValidCrossSection ( int  a_idx)

Finds the first valid cross section after a_idx in the inputs.

Parameters
[in]a_idxIndex used to find the next valid cross section
Returns
The index to the next valid cross section in the inputs. If none exists then -1 is returned.

Definition at line 199 of file XmStampInterpCrossSection.cpp.

References xms::XmStamperIo::m_cs, and m_io.

Referenced by FindFirstValidCrossSection(), and InterpMissingCrossSections().

◆ InterpCs() [1/2]

void xms::XmStampInterpCrossSectionImpl::InterpCs ( XmStampCrossSection a_prev,
XmStampCrossSection a_next,
double  a_percent,
XmStampCrossSection a_cs 
)
overridevirtual

Interpolates a cross section from 2 other cross sections using a weight (a_percent)

Parameters
[in]a_prevThe first cross section used to interpolate.
[in]a_nextThe second cross section used to interpolate.
[in]a_percentInterpolation weight applied to the prev/next cross sections.
[out]a_csThe newly interpolated cross section.

Definition at line 241 of file XmStampInterpCrossSection.cpp.

References InterpPts(), xms::XmStampCrossSection::m_idxLeftShoulder, xms::XmStampCrossSection::m_idxRightShoulder, xms::XmStampCrossSection::m_left, xms::XmStampCrossSection::m_leftMax, xms::XmStampCrossSection::m_right, xms::XmStampCrossSection::m_rightMax, and XM_ENSURE_TRUE.

Referenced by InterpCs(), and InterpMissingCrossSections().

◆ InterpCs() [2/2]

void xms::XmStampInterpCrossSectionImpl::InterpCs ( int  a_prev,
int  a_next,
double  a_percent,
XmStampCrossSection a_cs 
)

Interpolates a cross section from 2 other cross sections using a weight (a_percent)

Parameters
[in]a_prevIndex to the first cross section used to interpolate.
[in]a_nextIndex to the second cross section used to interpolate.
[in]a_percentInterpolation weight applied to the prev/next cross sections.
[out]a_csThe newly interpolated cross section.

Definition at line 224 of file XmStampInterpCrossSection.cpp.

References InterpCs(), xms::XmStamperIo::m_cs, and m_io.

◆ InterpMissingCrossSections()

void xms::XmStampInterpCrossSectionImpl::InterpMissingCrossSections ( XmStamperIo a_)
overridevirtual

Interpolates the missing cross sections. Modifys the m_cs member of the XmStamperIo class that is passed to this method.

Parameters
[in,out]a_The inputs and outputs for the feature stamp operation

Definition at line 100 of file XmStampInterpCrossSection.cpp.

References FindFirstValidCrossSection(), FindLastValidCrossSection(), FindNextValidCrossSection(), gmXyDistance(), InterpCs(), xms::XmStamperIo::m_centerLine, xms::XmStamperIo::m_cs, and m_io.

Referenced by XmStampInterpCrossSectionUnitTests::test0(), XmStampInterpCrossSectionUnitTests::test1(), and XmStampInterpCrossSectionUnitTests::testCrossSectionTutorial().

◆ InterpPts()

void xms::XmStampInterpCrossSectionImpl::InterpPts ( VecPt3d a_v1,
int  a_beg1,
int  a_end1,
VecPt3d a_v2,
int  a_beg2,
int  a_end2,
double  a_percent,
VecPt3d a_interpPts 
)

Interpolates part of 2 cross sections to part of a new cross section. Separate interpolations are done for the cross section between the center line and the shoulder and then from the shoulder to boundary of the cross section.

Parameters
[in]a_v1pts from the first cross section
[in]a_beg1Index to the start of the section of a_v1
[in]a_end1Index to the end of the section of a_v1
[in]a_v2pts from the second cross section
[in]a_beg2Index to the start of the section of a_v2
[in]a_end2Index to the end of the section of a_v2
[in]a_percentInterpolation weight applied to the prev/next cross sections.
[out]a_interpPtsVector of newly interpolated points

Definition at line 304 of file XmStampInterpCrossSection.cpp.

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

Referenced by InterpCs().

◆ PtFromT()

Pt3d xms::XmStampInterpCrossSectionImpl::PtFromT ( VecPt3d a_v,
int  a_beg,
VecDbl a_t,
double  a_tval 
)

Calculates the x,y location of the point at a_tval.

Parameters
[in]a_vvector of x,y
[in]a_begIndex to the start of the section of a_v
[in]a_tVector of calculated t values
[in]a_tvalParametric tvalue
Returns
the x,y location of the point at a_tval

Definition at line 360 of file XmStampInterpCrossSection.cpp.

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

Referenced by InterpPts().

◆ ValidCrossSectionsExist()

bool xms::XmStampInterpCrossSectionImpl::ValidCrossSectionsExist ( XmStamperIo a_)
overridevirtual

Interpolates the missing cross sections. Modifys the m_cs member of the XmStamperIo class that is passed to this method.

Parameters
[in,out]a_The inputs and outputs for the feature stamp operation
Returns
true if there are any valid cross sections

Definition at line 159 of file XmStampInterpCrossSection.cpp.

References FindFirstValidCrossSection(), and m_io.


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