Navigation
API > API/Runtime > API/Runtime/GeometryCollectionEngine > API/Runtime/GeometryCollectionEngine/GeometryCollection
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UGeometryCollection
References
| Module | GeometryCollectionEngine |
| Header | /Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Public/GeometryCollection/GeometryCollectionObject.h |
| Include | #include "GeometryCollection/GeometryCollectionObject.h" |
Syntax
class UGeometryCollection :
public UObject,
public IInterface_AssetUserData
Remarks
UGeometryCollectionObject (UObject)
UObject wrapper for the FGeometryCollection
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< class UAssetImportData > | AssetImportData | Importing data and options used for this geometry collection | |
| TArray< FGeometryCollectionAutoInstanceMesh > | AutoInstanceMeshes | List of unique static mesh / materials pairs for auto instancing. | |
| bool | bConvertVertexColorsToSRGB | Convert vertex colors to sRGB for rendering. | |
| bool | bDensityFromPhysicsMaterial | Whether to use density ( for mass computation ) from physics material ( if physics material is not set, use the component one or defaults ) | |
| bool | bImportCollisionFromSource | Whether to import collision from the source asset | |
| bool | bManualDataCreate | If this flag is set, we only regenerate simulation data when requested via CreateSimulationData() | |
| bool | bMassAsDensity | Mass As Density, units are in kg/m^3 ( only enabled if physics material is not set ) | |
| bool | bRemoveOnMaxSleep | Remove particle from simulation and dissolve rendered geometry once sleep threshold has been exceeded. | |
| bool | bScaleOnRemoval | When enabled, particle will scale down (shrink) when using being removed ( using both remove on sleep or remove on break ) - Enabled by default | |
| bool | bSlowMovingAsSleeping | When on non-sleeping, slow moving pieces will be considered as sleeping, this helps removal of jittery but not really moving objects. | |
| bool | bStripOnCook | Strip unnecessary data from the Geometry Collection to keep the memory footprint as small as possible. | |
| bool | bStripRenderDataOnCook | Strip unnecessary render data from the Geometry Collection to keep the memory footprint as small as possible. | |
| bool | bUseFullPrecisionUVs | Whether to use full precision UVs when rendering this geometry. | |
| bool | bUseSizeSpecificDamageThreshold | Whether to use size specific damage threshold instead of level based ones ( see Size Specific Data array ). | |
| EClusterConnectionTypeEnum | ClusterConnectionType | ||
| int32 | ClusterGroupIndex | Maximum level for cluster breaks. | |
| float | ConnectionGraphBoundsFilteringMargin | ||
| TObjectPtr< UClass > | CustomRendererType | Custom class type that will be used to render the geometry collection instead of using the native rendering. | |
| EDamageModelTypeEnum | DamageModel | Damage model to use for evaluating destruction. | |
| FGeometryCollectionDamagePropagationData | DamagePropagationData | Data about how damage propagation shoudl behave. | |
| TArray< float > | DamageThreshold | Damage threshold for clusters at different levels. | |
| TObjectPtr< UDataflow > | DataflowAsset | Dataflow | |
| FString | DataflowTerminal | ||
| TArray< FGeometryCollectionEmbeddedExemplar > | EmbeddedGeometryExemplar | References for embedded geometry generation | |
| bool | EnableClustering | ||
| bool | EnableNanite | Enable support for Nanite. | |
| TArray< FGeometryCollectionSource > | GeometrySource | ||
| float | Mass | Total Mass of Collection. | |
| TArray< TObjectPtr< UMaterialInterface > > | Materials | ||
| int32 | MaxClusterLevel | Maximum level for cluster breaks. | |
| FVector2D | MaximumSleepTime | How long may the particle sleep before initiating removal (in seconds). | |
| float | MinimumMassClamp | Smallest allowable mass (def:0.1) | |
| TMap< FString, FString > | Overrides | ||
| bool | PerClusterOnlyDamageThreshold | Compatibility check, when true, only cluster compute damage from parameters and propagate to direct children when false, each child will compute it's damage threshold allowing for more precise and intuitive destruction behavior | |
| TObjectPtr< UPhysicalMaterial > | PhysicsMaterial | Physics material to use for the geometry collection | |
| FVector2D | RemovalDuration | How long does the removal process take (in seconds). | |
| TUniquePtr< FGeometryCollectionRenderData > | RenderData | Pointer to the data used to render this geometry collection. | |
| FGeometryCollectionProxyMeshData | RootProxyData | Static mesh to use as a proxy for rendering until the geometry collection is broken. | |
| TArray< FGeometryCollectionSizeSpecificData > | SizeSpecificData | Size Specfic Data reflects the default geometry to bind to rigid bodies smaller than the max size volume. | |
| float | SlowMovingVelocityThreshold | When slow moving detection is on, this defines the linear velocity thresholds in cm/s to consider the object as sleeping . | |
| TObjectPtr< class UThumbnailInfo > | ThumbnailInfo | Information for thumbnail rendering |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UGeometryCollection
(
const FObjectInitializer& ObjectInitializer |
|||
UGeometryCollection
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | AddNewMaterialSlot
(
bool bCopyLastMaterial |
Add a material to the materials array and update the selected bone material to be at the end of the array | |
| int32 | AppendGeometry
(
const UGeometryCollection& Element, |
AppendGeometry | |
| int32 | AttachEmbeddedGeometryExemplar
(
const UStaticMesh* Exemplar |
Attach a Static Mesh exemplar for embedded geometry, if that mesh has not already been attached. | |
| TSharedPtr< FGeometryCollection, ESPMode::ThreadSafe > | CopyCollectionAndRemoveGeometry
(
const TSharedPtr< const FGeometryCollection, ESPMode::ThreadSafe >& CollectionToCopy |
Copy a collection and remove geometry from it | |
| void | Create the simulation data that can be shared among all instances (mass, volume, etc...) Note : this does not check if the simulation data is drty or not and will cause a load from the DDC use CreateSimulationDataIfNeeded() for avoiding extra runtime cost | ||
| void | Create the simulation data ( calls CreateSimulationData) only if the simulation data is dirty | ||
| void | EnsureDataIsCooked
(
bool bInitResources, |
||
| int32 | FindOrAddAutoInstanceMesh
(
const UStaticMesh* StaticMesh, |
Find or add a auto instance mesh from a mesh and alist of material and return its index | |
| int32 | FindOrAddAutoInstanceMesh
(
const FGeometryCollectionAutoInstanceMesh& AutoInstanceMesh |
Find or add a auto instance mesh from another one and return its index | |
| TSharedPtr< FGeometryCollection, ESPMode::ThreadSafe > | Produce a deep copy of GeometryCollection member, stripped of data unecessary for gameplay. | ||
| FGeometryCollectionSizeSpecificData | |||
| const FGeometryCollectionAutoInstanceMesh & | GetAutoInstanceMesh
(
int32 AutoInstanceMeshIndex |
Find or add a auto instance mesh and return its index | |
| UMaterialInterface * | |||
| const int32 | |||
| FGeometryCollectionSizeSpecificData & | Size Specific Data Access | ||
| const FGeometryCollectionSizeSpecificData & | |||
| int | |||
| TSharedPtr< FGeometryCollection, ESPMode::ThreadSafe > | |||
| const TSharedPtr< FGeometryCollection, ESPMode::ThreadSafe > | |||
| FGuid | GetIdGuid () |
Accessors for the two guids used to identify this collection | |
| float | GetMassOrDensity
(
bool& bOutIsDensity |
Get Mass or density as set by the asset Mass is return in Kg and Density is returned in Kg/Cm3 | |
| uint32 | |||
| uint32 | GetNaniteHierarchyOffset
(
int32 GeometryIndex, |
||
| uint32 | |||
| FGeometryCollectionRenderResourceSizeInfo | Get the size of the render data resources associated with this collection | ||
| int32 | GetRootIndex () |
Get the cached root index | |
| const TCHAR * | Returns the asset path for the automatically populated selected material. | ||
| void | GetSharedSimulationParams
(
FSharedSimulationParameters& OutParams |
Fills params struct with parameters used for precomputing content. | |
| FGuid | GetStateGuid () |
||
| bool | HasMeshData () |
Has data for static mesh rendering. | |
| bool | Has data for nanite rendering. | ||
| bool | Returns true if there is anything to render | ||
| void | InitializeMaterials
(
bool bHasLegacyInternalMaterialsPairs |
Appends the standard materials to this UObject | |
| void | |||
| void | Invalidates this collection signaling a structural change and renders any previously recorded caches unable to play with this collection | ||
| bool | Check to see if Simulation Data requires regeneration | ||
| int32 | NumElements
(
const FName& Group |
NumElements | |
| void | PostSerialize
(
const FArchive& Ar |
End UObject InterfaceSerialize | |
| void | Propogate render state dirty to components | ||
| void | Propogate the fact that transform have been updated to all components | ||
| void | Rebuild the render data. | ||
| void | ReindexMaterialSections | ||
| void | |||
| void | RemoveElements
(
const FName& Group, |
RemoveElements | |
| void | RemoveExemplars
(
const TArray< int32 >& SortedRemovalIndices |
Remove embedded geometry exemplars with indices matching the sorted removal list. | |
| bool | Remove a material from the materials array, keeping the selected bone material at the end of the array. | ||
| void | Reset () |
Return collection to initial (ie. empty) state. | |
| void | ResetFrom
(
const FManagedArrayCollection& InCollection, |
Reset the collection from another set of attributes and materials. | |
| void | SetConvertVertexColorsToSRGB
(
bool bValue |
||
| void | SetEnableNanite
(
bool bValue |
||
| void | SetGeometryCollection
(
TSharedPtr< FGeometryCollection, ESPMode::ThreadSafe > GeometryCollectionIn |
Accessors for internal geometry collection | |
| void | Update the convex geometry on the collection. | ||
| void | Update the convex geometry on the collection. | ||
| void | Update properties that depend on the geometry and clustering: Proximity, Convex Hulls, Volume and Size data. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| bool | Modify
(
bool bAlwaysMarkDirty |
Note that the object will be modified. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
UObject Interface | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | End UObject InterfaceSerialize |
Overridden from IInterface_AssetUserData
| Type | Name | Description | |
|---|---|---|---|
| void | AddAssetUserData
(
UAssetUserData* InUserData |
||
| const TArray< UAssetUserData * > * | |||
| UAssetUserData * | GetAssetUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
||
| void | RemoveUserDataOfClass
(
TSubclassOf< UAssetUserData > InUserDataClass |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| float | CollisionObjectReductionPercentage_DEPRECATED | Resolution on the smallest axes for the level set. (def: 10) | |
| float | CollisionParticlesFraction_DEPRECATED | Number of particles on the triangulated surface to use for collisions. | |
| ECollisionTypeEnum | CollisionType_DEPRECATED | CollisionType defines how to initialize the rigid collision structures. | |
| bool | EnableRemovePiecesOnFracture_DEPRECATED | Enable remove pieces on fracture | |
| EImplicitTypeEnum | ImplicitType_DEPRECATED | CollisionType defines how to initialize the rigid collision structures. | |
| int32 | MaxClusterLevelSetResolution_DEPRECATED | Resolution on the smallest axes for the level set. (def: 10) | |
| int32 | MaximumCollisionParticles_DEPRECATED | Max number of particles. | |
| int32 | MaxLevelSetResolution_DEPRECATED | Resolution on the smallest axes for the level set. (def: 10) | |
| int32 | MinClusterLevelSetResolution_DEPRECATED | Resolution on the smallest axes for the level set. (def: 5) | |
| int32 | MinLevelSetResolution_DEPRECATED | Resolution on the smallest axes for the level set. (def: 5) | |
| TArray< TObjectPtr< UMaterialInterface > > | RemoveOnFractureMaterials_DEPRECATED | Materials relating to remove on fracture | |
| FSoftObjectPath | RootProxy_DEPRECATED | Static mesh to use as a proxy for rendering until the geometry collection is broken |