56 template<
typename SegmentIDEnumerable,
typename GetSegmentFunc>
85 for (
int32 SegmentID = 0; SegmentID <
Segments.Num(); ++SegmentID)
296 for (
int32 k = 0; k < NumIndices; ++k)
324 for (
int i = 0; i <
Count; ++i)
340 for (
int i = 0; i <
Count; ++i)
347 if (Interval.
Length() > FMathd::ZeroTolerance)
461 for (
int i = 1; i <= NumSegments; ++i)
545 for (
int i = 1; i <= NumSegments; ++i)
#define checkSlow(expr)
Definition AssertionMacros.h:332
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
void SetNumUninitialized(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2369
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
Definition AssetRegistryState.h:50
static RealType Sqrt(const RealType Value)
Definition MathUtil.h:342
static RealType Abs(const RealType Value)
Definition MathUtil.h:215
static RealType Min(const RealType A, const RealType B)
Definition MathUtil.h:271
Definition SegmentTree3.h:36
void FindNearestVisibleSegmentHitByRayInternal(int BoxIndex, const FRay3d &Ray, TFunctionRef< bool(int32, const FVector3d &, const FVector3d &)> WithinToleranceCheck, int &NearSegmentIdx, FRayNearestSegmentInfo &NearestInfo, const IMeshSpatial::FQueryOptions &Options) const
Definition SegmentTree3.h:534
int TopDownLeafMaxSegmentCount
Definition SegmentTree3.h:183
bool FindNearestVisibleSegmentHitByRay(const FRay3d &Ray, TFunctionRef< bool(int32, const FVector3d &, const FVector3d &)> WithinToleranceCheck, FSegment &NearestHitSegmentOut, FRayNearestSegmentInfo &NearestInfo, const IMeshSpatial::FQueryOptions &Options=IMeshSpatial::FQueryOptions()) const
Definition SegmentTree3.h:152
int SplitSegmentSetMidpoints(TArray< int > &SegmentIndices, TArray< FVector3d > &SegmentCenters, int StartIdx, int Count, int Depth, int MinSegmentCount, FBoxesSet &SegmentBoxes, FBoxesSet &Nodes, FAxisAlignedBox3d &Box)
Definition SegmentTree3.h:307
double GetBoxDistanceSqr(int BoxIndex, const FVector3d &V) const
Definition SegmentTree3.h:418
void Build(const TArray< FSegment3d > &Segments)
Definition SegmentTree3.h:82
void Build(SegmentIDEnumerable Enumerable, GetSegmentFunc GetSegmentForID, int32 NumSegmentsHint=0)
Definition SegmentTree3.h:57
double GetRayBoxIntersectionParam(int BoxIndex, const FRay3d &Ray, double Radius=0) const
Definition SegmentTree3.h:434
double BoxEps
Definition SegmentTree3.h:416
void FindNearestSegmentInternal(int BoxIndex, const FVector3d &P, double &NearestDistSqr, int &NearSegmentIdx, const IMeshSpatial::FQueryOptions &Options) const
Definition SegmentTree3.h:454
TArray< FTreeBox > TreeBoxes
Definition SegmentTree3.h:205
bool FindNearestSegment(const FVector3d &P, FSegment &NearestSegmentOut, const IMeshSpatial::FQueryOptions &Options=IMeshSpatial::FQueryOptions()) const
Definition SegmentTree3.h:109
void SetTolerance(double Tolerance)
Definition SegmentTree3.h:409
int SegmentsEnd
Definition SegmentTree3.h:222
GetSplitAxisFunc GetSplitAxis
Definition SegmentTree3.h:193
static GetSplitAxisFunc MakeDefaultSplitAxisFunc()
Definition SegmentTree3.h:185
int RootBoxIndex
Definition SegmentTree3.h:225
TArray< int > IndexList
Definition SegmentTree3.h:219
void BuildTopDown(TArray< int > &SegmentIndices, TArray< FVector3d > &SegmentCenters, int32 NumSegments)
Definition SegmentTree3.h:243
TArray< FSegment > SegmentList
Definition SegmentTree3.h:196
static double SquaredDistance(const TRay< Real > &Ray, const TSegment3< Real > &Segment, Real &RayParam, Real &SegParam)
Definition DistRay3Segment3.h:225
Definition DynamicVector.h:27
void InsertAt(const Type &Data, unsigned int Index)
Definition DynamicVector.h:747
static bool FindIntersection(const TRay< RealType > &Ray, const TAxisAlignedBox3< RealType > &Box, RealType &RayParamOut)
Definition IntrRay3AxisAlignedBox3.h:110
constexpr int InvalidID
Definition IndexTypes.h:13
RealType Area(const TVector< RealType > &V0, const TVector< RealType > &V1, const TVector< RealType > &V2)
Definition VectorUtil.h:93
TAxisAlignedBox3< double > FAxisAlignedBox3d
Definition BoxTypes.h:885
Definition AdvancedWidgetsModule.cpp:13
Definition NumericLimits.h:41
Definition SegmentTree3.h:231
int IBoxCur
Definition SegmentTree3.h:234
TDynamicVector< int > IndexList
Definition SegmentTree3.h:233
TDynamicVector< FTreeBox > Boxes
Definition SegmentTree3.h:232
FBoxesSet()
Definition SegmentTree3.h:236
int IIndicesCur
Definition SegmentTree3.h:235
Definition SegmentTree3.h:130
double Metric
Definition SegmentTree3.h:138
double SegmentParam
Definition SegmentTree3.h:134
double RayParam
Definition SegmentTree3.h:132
double SegmentDist
Definition SegmentTree3.h:136
Definition SegmentTree3.h:46
int32 ID
Definition SegmentTree3.h:47
FSegment3d Segment
Definition SegmentTree3.h:48
Definition SegmentTree3.h:200
int BoxToIndex
Definition SegmentTree3.h:201
FVector3d Extents
Definition SegmentTree3.h:203
FVector3d Center
Definition SegmentTree3.h:202
Definition SpatialInterfaces.h:57
TFunction< bool(int)> TriangleFilterF
Definition SpatialInterfaces.h:66
static TAxisAlignedBox3< double > Empty()
Definition BoxTypes.h:382
void Contain(const RealType &V)
Definition BoxTypes.h:68
RealType Length() const
Definition BoxTypes.h:58
RealType Center() const
Definition BoxTypes.h:49
static TInterval1< double > Empty()
Definition BoxTypes.h:34
TVector< T > Origin
Definition Ray.h:24
TVector< T > PointAt(T RayParameter) const
Definition Ray.h:105
T Z
Definition Vector.h:68
static TVector< double > Zero()
Definition Vector.h:112
T Y
Definition Vector.h:65
T X
Definition Vector.h:62