@@ -334,12 +334,14 @@ namespace PCGExPaths
334334
335335 PCGExMath::FClosestPosition FPath::FindClosestIntersection (
336336 const FPCGExPathIntersectionDetails& InDetails,
337- const PCGExMath::FSegment& Segment, const PCGExMath::EIntersectionTestMode Mode ) const
337+ const PCGExMath::FSegment& Segment) const
338338 {
339339 PCGExMath::FClosestPosition Closest (Segment.A );
340340
341341 if (!Bounds.Intersect (Segment.Bounds )) { return Closest; }
342342
343+ const uint8 Strictness = InDetails.Strictness ;
344+
343345 GetEdgeOctree ()->FindElementsWithBoundsTest (
344346 Segment.Bounds , [&](const FPathEdge* PathEdge)
345347 {
@@ -355,8 +357,7 @@ namespace PCGExPaths
355357 GetPos_Unsafe (PathEdge->Start ),
356358 GetPos_Unsafe (PathEdge->End ),
357359 InDetails.ToleranceSquared ,
358- OnSegment,
359- OnPath, Mode))
360+ OnSegment, OnPath, Strictness))
360361 {
361362 return ;
362363 }
@@ -369,13 +370,14 @@ namespace PCGExPaths
369370
370371 PCGExMath::FClosestPosition FPath::FindClosestIntersection (
371372 const FPCGExPathIntersectionDetails& InDetails,
372- const PCGExMath::FSegment& Segment, PCGExMath::FClosestPosition& OutClosestPosition,
373- const PCGExMath::EIntersectionTestMode Mode) const
373+ const PCGExMath::FSegment& Segment, PCGExMath::FClosestPosition& OutClosestPosition) const
374374 {
375375 PCGExMath::FClosestPosition Closest (Segment.A );
376376
377377 if (!Bounds.Intersect (Segment.Bounds )) { return Closest; }
378378
379+ const uint8 Strictness = InDetails.Strictness ;
380+
379381 GetEdgeOctree ()->FindElementsWithBoundsTest (
380382 Segment.Bounds , [&](const FPathEdge* PathEdge)
381383 {
@@ -391,8 +393,7 @@ namespace PCGExPaths
391393 GetPos_Unsafe (PathEdge->Start ),
392394 GetPos_Unsafe (PathEdge->End ),
393395 InDetails.ToleranceSquared ,
394- OnSegment,
395- OnPath, Mode))
396+ OnSegment, OnPath, Strictness))
396397 {
397398 OutClosestPosition.Update (OnPath, -2 );
398399 return ;
@@ -789,16 +790,15 @@ namespace PCGExPaths
789790 PCGExMath::FClosestPosition FindClosestIntersection (
790791 const TArray<TSharedPtr<FPath>>& Paths,
791792 const FPCGExPathIntersectionDetails& InDetails,
792- const PCGExMath::FSegment& InSegment, int32& OutPathIndex,
793- const PCGExMath::EIntersectionTestMode Mode)
793+ const PCGExMath::FSegment& InSegment, int32& OutPathIndex)
794794 {
795795 OutPathIndex = -1 ;
796796
797797 PCGExMath::FClosestPosition Intersection (InSegment.A );
798798
799799 for (int i = 0 ; i < Paths.Num (); i++)
800800 {
801- PCGExMath::FClosestPosition LocalIntersection = Paths[i]->FindClosestIntersection (InDetails, InSegment, Mode );
801+ PCGExMath::FClosestPosition LocalIntersection = Paths[i]->FindClosestIntersection (InDetails, InSegment);
802802 if (!LocalIntersection) { continue ; }
803803 if (Intersection.Update (LocalIntersection, LocalIntersection.Index )) { OutPathIndex = i; }
804804 }
@@ -810,16 +810,15 @@ namespace PCGExPaths
810810 const TArray<TSharedPtr<FPath>>& Paths,
811811 const FPCGExPathIntersectionDetails& InDetails,
812812 const PCGExMath::FSegment& InSegment, int32& OutPathIndex,
813- PCGExMath::FClosestPosition& OutClosestPosition,
814- const PCGExMath::EIntersectionTestMode Mode)
813+ PCGExMath::FClosestPosition& OutClosestPosition)
815814 {
816815 OutPathIndex = -1 ;
817816
818817 PCGExMath::FClosestPosition Intersection (InSegment.A );
819818
820819 for (int i = 0 ; i < Paths.Num (); i++)
821820 {
822- PCGExMath::FClosestPosition LocalIntersection = Paths[i]->FindClosestIntersection (InDetails, InSegment, OutClosestPosition, Mode );
821+ PCGExMath::FClosestPosition LocalIntersection = Paths[i]->FindClosestIntersection (InDetails, InSegment, OutClosestPosition);
823822
824823 if (OutClosestPosition.Index == -2 ) { OutClosestPosition.Index = i; }
825824
0 commit comments