xmsstamper  1.0
xms::XmUtil Class Reference

Utility functions. More...

#include <XmUtil.h>

Static Public Member Functions

static void ConvertXsPointsTo3d (const Pt3d &a_cl, const VecPt3d &a_pts, double a_maxX, double a_angle, VecPt3d2d &a_3dpts)
 Converts the left or right portion of a cross section data to 3d point locations using the angle from the center line and the max x value. More...
 
static void EnsureVectorAtMaxX (VecPt3d &a_pts, double a_maxX)
 Makes sure the cross section goes to the maxX value. More...
 
static void GetAnglesFromCenterLine (size_t a_idx, const VecPt3d &a_cl, double &a_leftAngle, double &a_rightAngle)
 Gets the angles of the left and right cross sections relative to the centerline. More...
 
static void ScaleCrossSectionXvals (XmStampCrossSection &a_xs, double a_factor)
 Converts interpolated cross sections to 3d. More...
 

Detailed Description

Utility functions.

Definition at line 33 of file XmUtil.h.

Member Function Documentation

◆ ConvertXsPointsTo3d()

void xms::XmUtil::ConvertXsPointsTo3d ( const Pt3d a_cl,
const VecPt3d a_pts,
double  a_maxX,
double  a_angle,
VecPt3d2d a_3dpts 
)
static

Converts the left or right portion of a cross section data to 3d point locations using the angle from the center line and the max x value.

Parameters
[in]a_clThe location on the centerline for these cross section points
[in]a_ptsThe cross section points
[in]a_maxXThe max X value for this portion of the cross section
[in]a_angleThe angle of the cross section relative to the center line of the cross section
[out]a_3dpts(x,y,z) points that are filled by the this method

Definition at line 49 of file XmUtil.cpp.

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

Referenced by xms::XmStamperImpl::ConvertCrossSectionsTo3d(), xms::XmSlopedAbutmentUtilImpl::ConvertTo3d(), and xms::XmGuideBankUtilImpl::CrossSectionTo3dPts().

◆ EnsureVectorAtMaxX()

void xms::XmUtil::EnsureVectorAtMaxX ( VecPt3d a_pts,
double  a_maxX 
)
static

Makes sure the cross section goes to the maxX value.

Parameters
[in,out]a_pts2d points
[in]a_maxXMax x value

Definition at line 94 of file XmUtil.cpp.

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

Referenced by xms::XmGuideBankUtilImpl::AdjustEndCapCrossSection(), ConvertXsPointsTo3d(), xms::XmSlopedAbutmentUtilImpl::EnsureCrossSectionAtMaxX(), and XmUtilUnitTests::test_EnsureVectorAtMaxX().

◆ GetAnglesFromCenterLine()

void xms::XmUtil::GetAnglesFromCenterLine ( size_t  a_idx,
const VecPt3d a_cl,
double &  a_leftAngle,
double &  a_rightAngle 
)
static

Gets the angles of the left and right cross sections relative to the centerline.

Parameters
[in]a_idxIndex of the current cross section
[in]a_clArray of locations defining center line
[out]a_leftAngleThe angle of the left cross section relative to the center line.
[out]a_rightAngleThe angle of the right cross section relative to the center line.

Definition at line 153 of file XmUtil.cpp.

References gmBisectingAngle(), gmPerpendicularAngle(), and XM_ENSURE_TRUE.

Referenced by xms::XmStamperImpl::ConvertCrossSectionsTo3d(), and xms::XmGuideBankUtilImpl::CrossSectionTo3dPts().

◆ ScaleCrossSectionXvals()

void xms::XmUtil::ScaleCrossSectionXvals ( XmStampCrossSection a_xs,
double  a_factor 
)
static

Converts interpolated cross sections to 3d.

Parameters
[in,out]a_xsCross section
[in]a_factorValue multiplied to each X val

Definition at line 80 of file XmUtil.cpp.

References xms::XmStampCrossSection::m_left, xms::XmStampCrossSection::m_leftMax, xms::XmStampCrossSection::m_right, and xms::XmStampCrossSection::m_rightMax.

Referenced by xms::XmGuideBankUtilImpl::GuideBankEndCap(), and xms::XmSlopedAbutmentUtilImpl::InterpolateCrossSections().


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