18template<
typename PolylineType,
typename Po
intType>
165 int32 SegmentIndex = 0;
239#ifdef DEBUG_CURVE_SAMPLING
244#ifdef CHECK_RESULT_MAKE_ISO_POLYLINE
328 double ABLength = PointType::Distance(PointA, PointB) / 2;
416#ifdef DEBUG_CURVE_SAMPLING
418 int32 CurveIndex = 0;
458#ifdef CHECK_RESULT_MAKE_ISO_POLYLINE
472 double MaxError[2] = { 0., 0. };
485 MaxError[0] = FMath::Max(MaxError[0],
ChordError);
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define HUGE_VALUE
Definition Types.h:16
#define UE_DOUBLE_SMALL_NUMBER
Definition UnrealMathUtility.h:139
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
ElementType Pop(EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:1196
UE_FORCEINLINE_HINT void EmplaceAt(SizeType Index, ArgsType &&... Args)
Definition Array.h:2665
SizeType Insert(std::initializer_list< ElementType > InitList, const SizeType InIndex)
Definition Array.h:1875
void Empty(SizeType Slack=0)
Definition Array.h:2273
static void Printf(EVerboseLevel Level, const FmtType &Text, Types... Args)
Definition Message.h:29
Definition SamplerAbstract.h:20
void CompletesPolyline(int32 NeededPointNumber, int32 IntermediateIndex)
Definition SamplerAbstract.h:276
const TArray< double > & TmpPolylineCoordinates
Definition SamplerAbstract.h:388
TSamplingPoint EndStudySegment
Definition SamplerAbstract.h:409
virtual void EvaluatesNewCandidatePoints()=0
virtual ~TCurveSamplerAbstract()=default
void RunSampling()
Definition SamplerAbstract.h:143
virtual void GetNotDerivableCoordinates(TArray< double > &OutNotDerivableCoordinates)
Definition SamplerAbstract.h:86
double DesiredChordError
Definition SamplerAbstract.h:414
virtual void Sample()
Definition SamplerAbstract.h:66
virtual int32 CheckSamplingError(int32 FirstIndex, int32 EndIndex)=0
int32 GetFirstNeighbor(int32 NeighborIndex, const double StartCoordinate, const PolylineType &Points, const int32 Increment, double &NeighborCoordinate)
Definition SamplerAbstract.h:315
PolylineType & Sampling
Definition SamplerAbstract.h:384
TArray< char > IsOptimalSegments
Definition SamplerAbstract.h:392
virtual void SamplingInitalizing()
Definition SamplerAbstract.h:93
TArray< double > NextCoordinates
Definition SamplerAbstract.h:412
FLinearBoundary Boundary
Definition SamplerAbstract.h:381
int32 EndSamplingSegmentIndex
Definition SamplerAbstract.h:402
bool AddIntermediateCoordinates(double UMin, double UMax, int32 PointNum)
Definition SamplerAbstract.h:251
const TArray< double > & SamplingCoordinates
Definition SamplerAbstract.h:389
int32 CheckTangentError(const PointType &APoint, double ACoordinate, const PointType &BPoint, double BCoordinate, int32 FirstIndex, int32 EndIndex, int32 InStartSamplingSegmentIndex)
Definition SamplerAbstract.h:334
int32 CountOfNeededPointsToRespectChordError(const PointType &PointA, const PointType &PointB, double ChordError)
Definition SamplerAbstract.h:326
PolylineType CandidatePoints
Definition SamplerAbstract.h:386
TCurveSamplerAbstract(const FLinearBoundary &InBoundary, PolylineType &OutPolyline, double InDesiredChordError)
Definition SamplerAbstract.h:51
int32 StartSamplingSegmentIndex
Definition SamplerAbstract.h:397
Definition CADEntity.cpp:23
void DisplaySegment(const FVector &Point1, const FVector &Point2, FIdent Ident, EVisuProperty Property)
Definition Display.cpp:1268
void Wait(bool bMakeWait=true)
Definition Display.h:55
void DisplayPoint(const TPoint &Point, FIdent Ident)
Definition Display.h:145
@ YellowCurve
Definition Visu.h:29
@ BluePoint
Definition Visu.h:30
@ YellowPoint
Definition Visu.h:28
@ BlueCurve
Definition Visu.h:31
@ Point
Definition Visu.h:17
@ Log
Definition Types.h:107
U16 Index
Definition radfft.cpp:71
static UE_FORCEINLINE_HINT bool IsNearlyEqual(float A, float B, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:388
static constexpr UE_FORCEINLINE_HINT T Square(const T A)
Definition UnrealMathUtility.h:578
double Max
Definition Boundary.h:24
double Min
Definition Boundary.h:23
Definition SamplerAbstract.h:24
constexpr bool IsSamplingPoint()
Definition SamplerAbstract.h:45
constexpr bool IsCandidatePoint()
Definition SamplerAbstract.h:40
TSamplingPoint(const PolylineType &InSampling)
Definition SamplerAbstract.h:29
int32 Index
Definition SamplerAbstract.h:27
const PolylineType * Polyline
Definition SamplerAbstract.h:26
void Set(const PolylineType &InPolyline, int32 InIndex)
Definition SamplerAbstract.h:34
const PolylineType * Sampling
Definition SamplerAbstract.h:25