MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / SaveMeshAsOBJComplex

Function SaveMeshAsOBJComplex

Source/URLab/Public/Utils/MeshUtils.h:73–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72template <typename VertexType, typename IndexType>
73int SaveMeshAsOBJComplex(const FString& FilePath, const Chaos::TArrayCollectionArray<VertexType>& Vertices,
74 const TArray<Chaos::TVector<IndexType, 3>>& Indices, float Threshold = 0.05f)
75{
76 CoACD_Mesh inputMesh = CoacdInterface::ConvertToCoACDMesh(Vertices, Indices);
77
78 CoACD_MeshArray result = CoACD_run(inputMesh, Threshold, -1, preprocess_auto, 30, 1000, 20, 150, 3, false, true, false, 100,
79 false, 0.01, apx_ch, 0, false);
80 int MeshCount = result.meshes_count;
81
82 UE_LOG(LogURLab, Log, TEXT("CoACD: %d convex hulls created (threshold=%.3f)"), result.meshes_count, Threshold);
83
84 CoacdInterface::SaveCoACDMeshArrayAsOBJ(result, FilePath);
85 CoACD_freeMeshArray(result);
86 return MeshCount;
87}
88
89template <typename VertexType, typename IndexType>
90int SaveMesh(const FString& FilePath, const Chaos::TArrayCollectionArray<VertexType>& Vertices,

Callers 1

SaveMeshFunction · 0.85

Calls 1

ConvertToCoACDMeshFunction · 0.85

Tested by

no test coverage detected