UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::CADKernel::TPolylineApproximator< PointType > Class Template Reference

#include <PolylineTools.h>

Public Member Functions

 TPolylineApproximator (const TArray< double > &InPolylineCoordinates, const TArray< PointType > &InPolylinePoints)
 
void GetStartEndIndex (const FLinearBoundary &InBoundary, int32 BoundaryIndices[2]) const
 
PointType ApproximatePoint (const double InCoordinate) const
 
template<class CurvePointType >
void ApproximatePoint (double InCoordinate, CurvePointType &OutPoint, int32 InDerivativeOrder) const
 
template<class CurvePointType >
void ApproximatePoints (const TArray< double > &InCoordinates, TArray< CurvePointType > &OutPoints, int32 InDerivativeOrder=0) const
 
void ApproximatePoints (const TArray< double > &InCoordinates, TArray< PointType > &OutPoints) const
 
void SamplePolyline (const FLinearBoundary &InBoundary, const double DesiredSegmentLength, TArray< double > &OutCoordinates) const
 
double ProjectPointToPolyline (const FLinearBoundary &InBoundary, const PointType &PointOnEdge, PointType &OutProjectedPoint) const
 
void ProjectPointsToPolyline (const FLinearBoundary &InBoundary, const TArray< PointType > &InPointsToProject, TArray< double > &OutProjectedPointCoords, TArray< PointType > &OutProjectedPoints) const
 
void ProjectCoincidentalPolyline (const FLinearBoundary &InBoundary, const TArray< PointType > &InPointsToProject, bool bSameOrientation, TArray< double > &OutProjectedPointCoords, const double ToleranceOfProjection) const
 
void GetSubPolyline (const FLinearBoundary &InBoundary, const EOrientation Orientation, TArray< PointType > &OutPoints) const
 
void GetSubPolyline (const FLinearBoundary &InBoundary, TArray< double > &OutCoordinates, TArray< PointType > &OutPoints) const
 
void UpdateSubPolylineBBox (const FLinearBoundary &InBoundary, FPolylineBBox &OutBBox) const
 
double ComputeLength () const
 
double ComputeLengthOfSubPolyline (const int BoundaryIndex[2], const FLinearBoundary &InBoundary) const
 
double ComputeLengthOfSubPolyline (const FLinearBoundary &InBoundary) const
 
template<int Dimension = 3>
void ComputeBoundingBox (const int BoundaryIndex[2], const FLinearBoundary &InBoundary, TAABB< PointType, Dimension > &Aabb)
 

Protected Member Functions

double ComputeCurvilinearCoordinatesOfPolyline (const FLinearBoundary &InBoundary, TArray< double > &OutCurvilinearCoordinates, int32 BoundaryIndices[2]) const
 
PointType ComputePoint (const int32 Index, const double PointCoordinate) const
 
double ProjectPointToPolyline (int32 BoundaryIndices[2], const PointType &InPointToProject, PointType &OutProjectedPoint) const
 

Protected Attributes

const TArray< double > & PolylineCoordinates
 
const TArray< PointType > & PolylinePoints
 

Constructor & Destructor Documentation

◆ TPolylineApproximator()

template<class PointType >
UE::CADKernel::TPolylineApproximator< PointType >::TPolylineApproximator ( const TArray< double > &  InPolylineCoordinates,
const TArray< PointType > &  InPolylinePoints 
)
inline

Member Function Documentation

◆ ApproximatePoint() [1/2]

template<class PointType >
PointType UE::CADKernel::TPolylineApproximator< PointType >::ApproximatePoint ( const double  InCoordinate) const
inline

Evaluate the point of the polyline at the input InCoordinate If the input coordinate is outside the boundary of the polyline, the coordinate of the nearest boundary is used.

◆ ApproximatePoint() [2/2]

template<class PointType >
template<class CurvePointType >
void UE::CADKernel::TPolylineApproximator< PointType >::ApproximatePoint ( double  InCoordinate,
CurvePointType OutPoint,
int32  InDerivativeOrder 
) const
inline

Evaluate the point of the polyline at the input Coordinate If the input coordinate is outside the boundary of the polyline, the coordinate of the nearest boundary is used.

◆ ApproximatePoints() [1/2]

template<class PointType >
template<class CurvePointType >
void UE::CADKernel::TPolylineApproximator< PointType >::ApproximatePoints ( const TArray< double > &  InCoordinates,
TArray< CurvePointType > &  OutPoints,
int32  InDerivativeOrder = 0 
) const
inline

◆ ApproximatePoints() [2/2]

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::ApproximatePoints ( const TArray< double > &  InCoordinates,
TArray< PointType > &  OutPoints 
) const
inline

Evaluate the points of the polyline associated to the increasing array of input Coordinates If the input coordinate is outside the boundary of the polyline, the coordinate of the nearest boundary is used.

◆ ComputeBoundingBox()

template<class PointType >
template<int Dimension = 3>
void UE::CADKernel::TPolylineApproximator< PointType >::ComputeBoundingBox ( const int  BoundaryIndex[2],
const FLinearBoundary InBoundary,
TAABB< PointType, Dimension > &  Aabb 
)
inline

◆ ComputeCurvilinearCoordinatesOfPolyline()

template<class PointType >
double UE::CADKernel::TPolylineApproximator< PointType >::ComputeCurvilinearCoordinatesOfPolyline ( const FLinearBoundary InBoundary,
TArray< double > &  OutCurvilinearCoordinates,
int32  BoundaryIndices[2] 
) const
inlineprotected

◆ ComputeLength()

template<class PointType >
double UE::CADKernel::TPolylineApproximator< PointType >::ComputeLength ( ) const
inline

◆ ComputeLengthOfSubPolyline() [1/2]

template<class PointType >
double UE::CADKernel::TPolylineApproximator< PointType >::ComputeLengthOfSubPolyline ( const FLinearBoundary InBoundary) const
inline

◆ ComputeLengthOfSubPolyline() [2/2]

template<class PointType >
double UE::CADKernel::TPolylineApproximator< PointType >::ComputeLengthOfSubPolyline ( const int  BoundaryIndex[2],
const FLinearBoundary InBoundary 
) const
inline

◆ ComputePoint()

template<class PointType >
PointType UE::CADKernel::TPolylineApproximator< PointType >::ComputePoint ( const int32  Index,
const double  PointCoordinate 
) const
inlineprotected

◆ GetStartEndIndex()

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::GetStartEndIndex ( const FLinearBoundary InBoundary,
int32  BoundaryIndices[2] 
) const
inline

◆ GetSubPolyline() [1/2]

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::GetSubPolyline ( const FLinearBoundary InBoundary,
const EOrientation  Orientation,
TArray< PointType > &  OutPoints 
) const
inline

Append to the OutPoints array the sub polyline bounded by InBoundary according to the orientation

◆ GetSubPolyline() [2/2]

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::GetSubPolyline ( const FLinearBoundary InBoundary,
TArray< double > &  OutCoordinates,
TArray< PointType > &  OutPoints 
) const
inline

Get the subset of point defining the sub polyline bounded by InBoundary OutCoordinates and OutPoints are emptied before the process

◆ ProjectCoincidentalPolyline()

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::ProjectCoincidentalPolyline ( const FLinearBoundary InBoundary,
const TArray< PointType > &  InPointsToProject,
bool  bSameOrientation,
TArray< double > &  OutProjectedPointCoords,
const double  ToleranceOfProjection 
) const
inline

Project each point of a coincidental polyline on the Polyline.

Parameters
ToleranceOfProjectionMax error between the both curve to stop the search of projection if ToleranceOfProjection < 0, it's compute with ComputeSquareToleranceForProjection

◆ ProjectPointsToPolyline()

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::ProjectPointsToPolyline ( const FLinearBoundary InBoundary,
const TArray< PointType > &  InPointsToProject,
TArray< double > &  OutProjectedPointCoords,
TArray< PointType > &  OutProjectedPoints 
) const
inline

Project a Set of points on a restricted polyline (StartIndex & EndIndex define the polyline boundary) Each points are projected on all segments of the restricted polyline, the closest are selected

◆ ProjectPointToPolyline() [1/2]

template<class PointType >
double UE::CADKernel::TPolylineApproximator< PointType >::ProjectPointToPolyline ( const FLinearBoundary InBoundary,
const PointType &  PointOnEdge,
PointType &  OutProjectedPoint 
) const
inline

Project a Set of points on a restricted polyline (StartIndex & EndIndex define the polyline boundary) the points are projected on all segments of the polyline, the closest are selected

◆ ProjectPointToPolyline() [2/2]

template<class PointType >
double UE::CADKernel::TPolylineApproximator< PointType >::ProjectPointToPolyline ( int32  BoundaryIndices[2],
const PointType &  InPointToProject,
PointType &  OutProjectedPoint 
) const
inlineprotected

Project a Set of points on a restricted polyline (StartIndex & EndIndex define the polyline boundary) the points are projected on all segments of the polyline, the closest are selected

◆ SamplePolyline()

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::SamplePolyline ( const FLinearBoundary InBoundary,
const double  DesiredSegmentLength,
TArray< double > &  OutCoordinates 
) const
inline

◆ UpdateSubPolylineBBox()

template<class PointType >
void UE::CADKernel::TPolylineApproximator< PointType >::UpdateSubPolylineBBox ( const FLinearBoundary InBoundary,
FPolylineBBox OutBBox 
) const
inline

Update the Curve bounding box with this subset of polyline

Member Data Documentation

◆ PolylineCoordinates

template<class PointType >
const TArray<double>& UE::CADKernel::TPolylineApproximator< PointType >::PolylineCoordinates
protected

◆ PolylinePoints

template<class PointType >
const TArray<PointType>& UE::CADKernel::TPolylineApproximator< PointType >::PolylinePoints
protected

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