UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CollectionBoundsFacade.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
5#include "Containers/Array.h"
6#include "Math/MathFwd.h"
10#include "Chaos/Triangle.h"
11
13{
14
22 {
23 public:
24
31
34
36 bool IsConst() const { return BoundingBoxAttribute.IsConst(); }
37
39 CHAOS_API bool IsValid() const;
40
43
45 const TManagedArray< FBox >& GetBoundingBoxes() const { return BoundingBoxAttribute.Get(); }
46
52
55
58
60 const TManagedArray< int32 >& GetTransformToGeometryIndex() const { return TransformToGeometryIndexAttribute.Get(); }
61
64
67
68 protected:
69
72
75
76 private:
78 FSphere ComputeBoundingSphere(const FBox& InBoundingBox);
79
82 void ComputeBoundingSphereImpl(const TArray<FVector>& InVertices, FSphere& OutSphere) const;
83 void ComputeBoundingSphereImpl2(const TArray<FVector>& InVertices, FSphere& OutSphere) const;
84 void ComputeBoundingSphere(const TArray<FVector>& InVertices, FSphere& OutSphere) const ;
85
86 private:
87 const FManagedArrayCollection& ConstCollection;
88 FManagedArrayCollection* Collection = nullptr;
89
90 TManagedArrayAccessor<FBox> BoundingBoxAttribute;
92 TManagedArrayAccessor<int32> BoneMapAttribute;
93 TManagedArrayAccessor<int32> TransformToGeometryIndexAttribute;
94 TManagedArrayAccessor<int32> VertexStartAttribute;
95 TManagedArrayAccessor<int32> VertexCountAttribute;
96 };
97
98}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition CollectionBoundsFacade.h:22
CHAOS_API FBox ComputeBoundingBox(const TArray< FVector > InPoints)
Definition CollectionBoundsFacade.cpp:401
CHAOS_API TArray< FVector > GetCentroids() const
Definition CollectionBoundsFacade.cpp:132
static CHAOS_API TArray< FVector > GetBoundingBoxVertexPositions(const FBox &InBox)
Definition CollectionBoundsFacade.cpp:186
CHAOS_API FSphere GetBoundingSphereInCollectionSpace()
Definition CollectionBoundsFacade.cpp:361
void UpdateVertexBasedBoundingBox()
Definition CollectionBoundsFacade.cpp:106
CHAOS_API FBox GetBoundingBoxInCollectionSpace() const
Definition CollectionBoundsFacade.cpp:149
void UpdateTransformBasedBoundingBox()
Definition CollectionBoundsFacade.cpp:80
const TManagedArray< int32 > & GetTransformToGeometryIndex() const
Definition CollectionBoundsFacade.h:60
CHAOS_API void DefineSchema()
Definition CollectionBoundsFacade.cpp:41
CHAOS_API bool IsValid() const
Definition CollectionBoundsFacade.cpp:47
const TManagedArray< FBox > & GetBoundingBoxes() const
Definition CollectionBoundsFacade.h:45
CHAOS_API void UpdateBoundingBox()
Definition CollectionBoundsFacade.cpp:53
bool IsConst() const
Definition CollectionBoundsFacade.h:36
Definition Array.h:670
Definition ManagedArray.h:1130
Definition ManagedArray.h:1099
Definition CollectionBoundsFacade.cpp:13
Definition ManagedArrayCollection.h:56
Definition ManagedArrayAccessor.h:20
const TManagedArray< T > & Get() const
Definition ManagedArrayAccessor.h:101