22template <
typename RealType>
58 template<
typename TriangleMeshAdapterType>
63 EIDtoTIDSpillID.
Reset();
64 SpillIDtoTIDs.Reset();
67 VIDtoEIDs.SetNum(
InMesh.MaxVertexID());
69 TIDtoEIDs.SetNum(
InMesh.MaxTriangleID());
94 SpillID = SpillIDtoTIDs.Emplace();
106 checkSlow(EIDtoTIDs.Num() == EIDtoVIDs.Num());
112 if (!EIDtoTIDSpillID.
IsEmpty())
138 return EIDtoVIDs.Num();
143 return EIDtoVIDs.IsValidIndex(
EID);
164 return TIDtoEIDs[
TID];
174 return EIDtoTIDs[VIDtoEIDs[VID][0]].A;
180 for (
int32 EID : VIDtoEIDs[VertexID])
183 if (
VIDs.A == VertexID)
197 for (
int32 EID : VIDtoEIDs[VertexID])
205 template<
typename TriangleMeshAdapterType>
208 for (
int32 EID : VIDtoEIDs[VertexID])
243 if (!EIDtoTIDSpillID.
IsEmpty())
270template<
typename TriangleMeshType>
296 [&](int) {
return true; },
297 [&](int) {
return true; },
298 [&]() {
return Triangles.
Num(); },
299 [&]() {
return Vertices.
Num(); },
300 [&]() {
return Triangles.
Num(); },
301 [&]() {
return Vertices.
Num(); },
303 [&](
int Idx) {
return FIndex3i(Triangles[Idx]); },
304 [&](
int Idx) {
return FVector3d(Vertices[Idx]); }};
311template<
typename IndexType,
typename OutRealType,
typename InVectorType=FVector>
393template<
typename IndexVectorType,
typename OutRealType,
typename InVectorType = FVector>
452 return FIndex3i((
int)Tri[0], (
int)Tri[1], (
int)Tri[2]);
479template <
class WrappedMeshType>
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TVector< double > FVector3d
Definition MathFwd.h:60
const bool
Definition NetworkReplayStreaming.h:178
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void Reset(SizeType NewSize=0)
Definition Array.h:2246
UE_REWRITE bool IsEmpty() const
Definition Array.h:1133
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
UE_NODEBUG UE_FORCEINLINE_HINT bool IsValidIndex(SizeType Index) const
Definition Array.h:1122
void Init(const ElementType &Element, SizeType Number)
Definition Array.h:3043
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
Definition MeshAdapter.h:53
int32 GetSingleVertexTriangle(int32 VID) const
Definition MeshAdapter.h:168
void EnumerateVertexVertices(int32 VertexID, TFunctionRef< void(int32)> VertexFunc) const
Definition MeshAdapter.h:178
void EnumerateEdgeTriangles(int32 EdgeID, TFunctionRef< void(int32)> TriangleFunc) const
Definition MeshAdapter.h:234
void BuildEdgeConnectivity(const TriangleMeshAdapterType &InMesh)
Definition MeshAdapter.h:59
void EnumerateVertexTriangles(int32 VertexID, TFunctionRef< void(int32)> TriangleFunc, const TriangleMeshAdapterType &InMesh) const
Definition MeshAdapter.h:206
int32 MaxEdgeID() const
Definition MeshAdapter.h:136
void EnumerateVertexEdges(int32 VertexID, TFunctionRef< void(int32)> EdgeFunc) const
Definition MeshAdapter.h:195
bool IsBoundaryEdge(int32 EID) const
Definition MeshAdapter.h:146
FIndex3i GetTriEdges(int32 TID) const
Definition MeshAdapter.h:162
FIndex2i GetEdgeT(int32 EID) const
Definition MeshAdapter.h:157
FIndex2i GetEdgeV(int32 EID) const
Definition MeshAdapter.h:151
bool IsEdge(int32 EID) const
Definition MeshAdapter.h:141
Definition MeshAdapter.h:272
TTriangleMeshAdapterEdgeConnectivity(const TriangleMeshType *InMesh)
Definition MeshAdapter.h:274
void EnumerateVertexTriangles(int32 VertexID, TFunctionRef< void(int32)> TriangleFunc) const
Definition MeshAdapter.h:280
FTriangleMeshAdapterd GetArrayMesh(TArray< FVector > &Vertices, TArray< FIntVector > &Triangles)
Definition MeshAdapter.h:293
TTriangleMeshAdapter< double > FTriangleMeshAdapterd
Definition MeshAdapter.h:44
TIndexMeshArrayAdapter< uint32, double > FIndexMeshArrayAdapterd
Definition MeshAdapter.h:470
TTriangleMeshAdapter< float > FTriangleMeshAdapterf
Definition MeshAdapter.h:45
Definition AdvancedWidgetsModule.cpp:13
U16 Index
Definition radfft.cpp:71
Definition IndexTypes.h:27
int B
Definition IndexTypes.h:32
void Sort()
Definition IndexTypes.h:112
Definition IndexTypes.h:158
int B
Definition IndexTypes.h:164
int A
Definition IndexTypes.h:163
int C
Definition IndexTypes.h:165
Definition MeshAdapter.h:313
TIndexMeshArrayAdapter(const TArray< InVectorType > *SourceVerticesIn, const TArray< IndexType > *SourceTrianglesIn)
Definition MeshAdapter.h:327
bool IsTriangle(int32 Index) const
Definition MeshAdapter.h:331
void GetTriVertices(int32 TriIndex, UE::Math::TVector< OutRealType > &V0, UE::Math::TVector< OutRealType > &V1, UE::Math::TVector< OutRealType > &V2) const
Definition MeshAdapter.h:378
void SetSources(const TArray< InVectorType > *SourceVerticesIn, const TArray< IndexType > *SourceTrianglesIn)
Definition MeshAdapter.h:317
int32 TriangleCount() const
Definition MeshAdapter.h:352
int32 MaxTriangleID() const
Definition MeshAdapter.h:341
uint64 GetChangeStamp() const
Definition MeshAdapter.h:362
int32 MaxVertexID() const
Definition MeshAdapter.h:346
TIndexMeshArrayAdapter()
Definition MeshAdapter.h:323
const TArray< InVectorType > * SourceVertices
Definition MeshAdapter.h:314
const TArray< IndexType > * SourceTriangles
Definition MeshAdapter.h:315
TVector< OutRealType > GetVertex(int32 Index) const
Definition MeshAdapter.h:373
int32 VertexCount() const
Definition MeshAdapter.h:357
FIndex3i GetTriangle(int32 Index) const
Definition MeshAdapter.h:367
bool IsVertex(int32 Index) const
Definition MeshAdapter.h:336
Definition MeshAdapter.h:395
int32 VertexCount() const
Definition MeshAdapter.h:439
const TArray< InVectorType > * SourceVertices
Definition MeshAdapter.h:396
bool IsVertex(int32 Index) const
Definition MeshAdapter.h:418
TIndexVectorMeshArrayAdapter()
Definition MeshAdapter.h:405
void SetSources(const TArray< InVectorType > *SourceVerticesIn, const TArray< IndexVectorType > *SourceTrianglesIn)
Definition MeshAdapter.h:399
int32 MaxVertexID() const
Definition MeshAdapter.h:428
int32 TriangleCount() const
Definition MeshAdapter.h:434
TIndexVectorMeshArrayAdapter(const TArray< InVectorType > *SourceVerticesIn, const TArray< IndexVectorType > *SourceTrianglesIn)
Definition MeshAdapter.h:409
TVector< OutRealType > GetVertex(int32 Index) const
Definition MeshAdapter.h:455
bool IsTriangle(int32 Index) const
Definition MeshAdapter.h:413
int32 MaxTriangleID() const
Definition MeshAdapter.h:423
const TArray< IndexVectorType > * SourceTriangles
Definition MeshAdapter.h:397
FIndex3i GetTriangle(int32 Index) const
Definition MeshAdapter.h:449
void GetTriVertices(int32 TriIndex, UE::Math::TVector< OutRealType > &V0, UE::Math::TVector< OutRealType > &V1, UE::Math::TVector< OutRealType > &V2) const
Definition MeshAdapter.h:460
uint64 GetChangeStamp() const
Definition MeshAdapter.h:444
Definition MeshAdapter.h:481
WrappedMeshType * WrappedAdapter
Definition MeshAdapter.h:482
TMeshWrapperAdapterd(WrappedMeshType *WrappedAdapterIn)
Definition MeshAdapter.h:484
Definition MeshAdapter.h:24
TFunction< FIndex3i(int32)> GetTriangle
Definition MeshAdapter.h:32
TFunction< bool(int32 index)> IsVertex
Definition MeshAdapter.h:26
TFunction< int32()> MaxVertexID
Definition MeshAdapter.h:28
TFunction< int32()> MaxTriangleID
Definition MeshAdapter.h:27
TFunction< bool(int32 index)> IsTriangle
Definition MeshAdapter.h:25
TFunction< uint64()> GetChangeStamp
Definition MeshAdapter.h:31
void GetTriVertices(int TID, UE::Math::TVector< RealType > &V0, UE::Math::TVector< RealType > &V1, UE::Math::TVector< RealType > &V2) const
Definition MeshAdapter.h:35
TFunction< int32()> VertexCount
Definition MeshAdapter.h:30
TFunction< TVector< RealType >(int32)> GetVertex
Definition MeshAdapter.h:33
TFunction< int32()> TriangleCount
Definition MeshAdapter.h:29