Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/InstancedStaticMesh
Inheritance Hierarchy
- FInstanceDataSceneProxy
- FISMCInstanceDataSceneProxy
- FISMCInstanceDataSceneProxyLegacyReordered
- FISMCInstanceDataSceneProxyNoGPUScene
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
| Include | #include "InstancedStaticMesh/ISMInstanceDataSceneProxy.h" |
Syntax
class FISMCInstanceDataSceneProxy : public FInstanceDataSceneProxy
Remarks
Proxy class that represents scene instance data to the renderer. Responsible for preparing data for render use per-platform & serializing such data for cooked builds. Supplies a persistent ID mapping for use in FScene. The ID mapping is reset when the proxy is recreated. Thus the FScene will generate full remove/add handling for proxy recreate events. Not responsible for storing the component representation of the instance data.
TODO: Add concept of async update and needing to sync the proxy before use. Probably split between immutable data (e.g, flags and stuff that don't depend on a data conversion process) and the bulk of the data. The immutable part is always valid & up to date on the RT (set in command, or before it is added).
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bBuildOptimized | This should be set when constructing for a static primitive that wants pre-built instances. | |
| bool | bIsNew | True when it has never been updated before. | |
| bool | bUseLegacyRenderingPath | ||
| ERHIFeatureLevel::Type | FeatureLevel | ||
| TPimplPtr< FOpaqueHitProxyContainer > | HitProxyContainer | Container for hitproxies that are used by the instances, uses the FDeferredCleanupInterface machinery to delete itself back on the game thread when replaced. | |
| FInstanceDataUpdateTaskInfo | InstanceDataUpdateTaskInfo | ||
| FInstanceIdIndexMap | InstanceIdIndexMap | ||
| FISMPrecomputedSpatialHashDataPtr | PrecomputedOptimizationData | ||
| FStaticShaderPlatform | ShaderPlatform | ||
| TBitArray | ValidInstanceIdMask | Id allocation tracking. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FISMCInstanceDataSceneProxy
(
FStaticShaderPlatform InShaderPlatform, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyAttributeChanges
(
FISMInstanceUpdateChangeSet& ChangeSet, |
||
| void | ApplyDataChanges
(
FISMInstanceUpdateChangeSet& ChangeSet, |
||
| void | Build
(
FISMInstanceUpdateChangeSet&& ChangeSet |
||
| void | BuildFromLegacyData
(
TUniquePtr< FStaticMeshInstanceData >&& ExternalLegacyData, |
||
| void | BuildFromOptimizedDataBuffers
(
FISMInstanceUpdateChangeSet& ChangeSet, |
Build an optimized instance buffer, where the order is sorted such that instances with the same spatial hash are consecutive. | |
| bool | CheckPlatformFeatureLevel
(
FStaticShaderPlatform InShaderPlatform, |
Make sure the shader platform & feature levels match. | |
| const FInstanceSceneDataBuffers & | GetData () |
||
| FVector3f | GetLocalBoundsPadExtent
(
const FRenderTransform& LocalToWorld, |
||
| void | TestAndApplyInstanceBufferSizeFixup
(
int32 PostUpdateNumInstances |
||
| void | Update
(
FISMInstanceUpdateChangeSet&& ChangeSet |
Overridable functions to update / build proxy data from a change set. | |
| void | UpdateIdMapping
(
FISMInstanceUpdateChangeSet& ChangeSet, |
Update the InstanceIdIndexMap given the change set. | |
| void | UpdatePrimitiveTransform
(
FISMInstanceUpdateChangeSet&& ChangeSet |
Handle only updating the primitive transform, could make use of special cases such as translation only if implemented properly. |
Overridden from FInstanceDataSceneProxy
| Type | Name | Description | |
|---|---|---|---|
| void | DebugDrawInstanceChanges
(
FPrimitiveDrawInterface* DebugPDI, |
||
| FInstanceDataUpdateTaskInfo * | Implement to provide syncable task info, if this returns a nullptr it is required that GeInstanceSceneDataBuffers() performs any needed synchronization. |
Typedefs
| Name | Description |
|---|---|
| FISMPrecomputedSpatialHashDataPtr |