![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <InstanceDataManager.h>
Inheritance diagram for FInstanceDataManager:Public Types | |
| enum class | ETrackingState : uint8 { Initial , Tracked , Disabled , Optimized } |
Protected Types | |
| using | EChangeFlag = FInstanceAttributeTracker::EFlag |
Protected Member Functions | |
| void | CreateExplicitIdentityMapping () |
| template<EChangeFlag Flag> | |
| void | MarkChangeHelper (int32 InstanceIndex) |
| template<EChangeFlag Flag> | |
| void | MarkChangeHelper (FPrimitiveInstanceId InstanceId) |
| void | MarkComponentRenderInstancesDirty () |
| bool | HasIdentityMapping () const |
| void | FreeInstanceId (FPrimitiveInstanceId InstanceId) |
| void | GatherDefaultData (const FInstanceDataManagerSourceDataDesc &ComponentData, FInstanceUpdateChangeSet &ChangeSet) const |
| void | InitChangeSet (const FInstanceDataManagerSourceDataDesc &ComponentData, FInstanceUpdateChangeSet &ChangeSet) const |
| void | InitChangeSet (const struct FChangeDesc2 &ChangeDesc, const FInstanceDataManagerSourceDataDesc &ComponentData, FInstanceUpdateChangeSet &ChangeSet) |
| TSharedPtr< class FUpdatableInstanceDataSceneProxy, ESPMode::ThreadSafe > | GetOrCreateProxyInternal () |
Protected Member Functions inherited from FInstanceIdIndexMap | |
| ENGINE_API void | RebuildFromIndexToIdMap (int32 MaxInstanceId) |
Static Protected Member Functions | |
| static bool | ShouldUsePrecomputed () |
Protected Attributes | |
| FInstanceAttributeTracker | InstanceUpdateTracker |
| TBitArray | ValidInstanceIdMask |
| int32 | IdSearchStartIndex = 0 |
| ETrackingState | TrackingState = ETrackingState::Initial |
| FInstanceDataFlags | AllChangedFlags |
| uint8 | bNumCustomDataChanged: 1 |
| uint8 | bTransformChangedAllInstances: 1 |
| uint8 | bPrimitiveTransformChanged: 1 |
| uint8 | bAnyInstanceChange: 1 |
| TSharedPtr< class FUpdatableInstanceDataSceneProxy, ESPMode::ThreadSafe > | InstanceDataProxy |
| TWeakObjectPtr< UPrimitiveComponent > | PrimitiveComponent = nullptr |
| FPrecomputedInstanceSpatialHashDataPtr | PrecomputedOptimizationData |
| FInstanceDataFlags | Flags |
| int32 | NumCustomDataFloats = 0 |
| float | AbsMaxDisplacement = 0.0f |
| FRenderBounds | MeshBounds |
Protected Attributes inherited from FInstanceIdIndexMap | |
| TArray< FPrimitiveInstanceId > | IndexToIdMap |
| TArray< int32 > | IdToIndexMap |
| int32 | NumInstances = 0 |
Manager class that tracks changes to instance data within the component, and is responsible for dispatching updates of the proxy. Tracks instance index changes to be able to maintain a persistent ID mapping for use on the render thread. The ID mapping is not serialized and will be reset when the proxy is recreated. Not responsible for storing the component representation of the instance data. NOTE/TODO: This is tied to the ISM use-case, mostly because of legacy (HISM) interactions. Will be refactored and sub-classed or something. Also: Still somewhat tied to the UComponent, which also can be refactored a bit to make it more general.
|
protected |
|
strong |
| FInstanceDataManager::FInstanceDataManager | ( | UPrimitiveComponent * | InPrimitiveComponent | ) |
| FPrimitiveInstanceId FInstanceDataManager::Add | ( | int32 | InInstanceAddAtIndex | ) |
Tracking functions that mirror what is done to each instance in the source instance data array.
| void FInstanceDataManager::BakedLightingDataChangedAll | ( | ) |
| void FInstanceDataManager::ClearChangeTracking | ( | ) |
Clear all tracked changes (will result in a full update when next one is flushed)
| void FInstanceDataManager::ClearInstances | ( | ) |
|
protected |
| bool FInstanceDataManager::FlushChanges | ( | FInstanceDataManagerSourceDataDesc && | ComponentData | ) |
Queries the tracker for changes and builds an update build command to enqueue to the render thread. The ComponentData supplies source data through a callback as needed.
|
protected |
|
protected |
| SIZE_T FInstanceDataManager::GetAllocatedSize | ( | ) | const |
| int32 FInstanceDataManager::GetMaxAllocatedInstanceId | ( | ) | const |
| TSharedPtr< FInstanceDataSceneProxy, ESPMode::ThreadSafe > FInstanceDataManager::GetOrCreateProxy | ( | ) |
|
protected |
| TSharedPtr< FInstanceDataSceneProxy, ESPMode::ThreadSafe > FInstanceDataManager::GetProxy | ( | ) |
|
inline |
|
inline |
Returns true if there are explicitly tracked instance changes, or the state is not tracked (because no proxy has been created yet), and the tracking state is not Disabled.
| bool FInstanceDataManager::HasAnyInstanceChanges | ( | ) | const |
|
protected |
|
protected |
Initialize a chage set from the component data & manager state but not using any delta information or updating tracked state.
|
protected |
|
inlineprotected |
|
inlineprotected |
|
protected |
| void FInstanceDataManager::NumCustomDataChanged | ( | ) |
| TArray< int32 > FInstanceDataManager::Optimize | ( | FInstanceDataManagerSourceDataDesc && | ComponentData, |
| bool | bShouldRetainIdMap | ||
| ) |
Compute the instance order used to build the instance hierarchy (spatial hashes) and return the reordering needed for this. This should be used by the data source (i.e., UComponent etc) to reorder the source instance buffers. Returns a reordering table where each index stores the old index for the given new index.
| void FInstanceDataManager::PrimitiveTransformChanged | ( | ) |
|
staticprotected |
| void FInstanceDataManager::TransformChanged | ( | FPrimitiveInstanceId | InstanceId | ) |
| void FInstanceDataManager::TransformsChangedAll | ( | ) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |