Navigation
API > API/Runtime > API/Runtime/GeometryCollectionEngine > API/Runtime/GeometryCollectionEngine/GeometryCollection > API/Runtime/GeometryCollectionEngine/GeometryCollection/FGeometryCollect-_9 > API/Runtime/GeometryCollectionEngine/GeometryCollection/FGeometryCollect-_9/AppendStaticMesh
References
| Module | GeometryCollectionEngine |
| Header | /Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Public/GeometryCollection/GeometryCollectionEngineConversion.h |
| Include | #include "GeometryCollection/GeometryCollectionEngineConversion.h" |
| Source | /Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionEngineConversion.cpp |
static bool AppendStaticMesh
(
const UStaticMesh * StaticMesh,
int32 StartMaterialIndex,
const FTransform & StaticMeshTransform,
FGeometryCollection * GeometryCollection,
bool bReindexMaterials,
bool bAddInternalMaterials,
bool bSplitComponents,
bool bSetInternalFromMaterialIndex
)
Remarks
TODO: consider having the below fn return bool, and have a helper that returns the StartMaterialIndex from UGeometryCollection before any materials are actually added, so we can call the AppendMaterial function after, and not need to use its return value ... This would let the is-there-a-valid-mesh logic live inside this function NOTE: and similar change will need to propagate to similar places ... Appends a static mesh to a GeometryCollectionComponent. true if succeeded in appending a mesh
Parameters
| Name | Description |
|---|---|
| StaticMesh | : Const mesh to read vertex/normals/index data from |
| StartMaterialIndex | : Index of materials to be used, e.g. as returned by AppendMaterials() (see below) |
| StaticMeshTransform | : Mesh transform. |
| GeometryCollection | : Collection to append the mesh into. |
| bReindexMaterials | : Whether to reindex materials if appending multiple meshes, pass false and call ReindexMaterials afterwards |