Navigation
API > API/Runtime > API/Runtime/Engine
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).
| Name | FISMCInstanceDataSceneProxy |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
| Include Path | #include "InstancedStaticMesh/ISMInstanceDataSceneProxy.h" |
Syntax
class FISMCInstanceDataSceneProxy : public FInstanceDataSceneProxy
Inheritance Hierarchy
- FInstanceDataSceneProxy → FISMCInstanceDataSceneProxy
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FISMCInstanceDataSceneProxy
(
FStaticShaderPlatform InShaderPlatform, |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FISMPrecomputedSpatialHashDataPtr | TSharedPtr< const FISMPrecomputedSpatialHashData, ESPMode::ThreadSafe > | InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Build
(
FISMInstanceUpdateChangeSet&& ChangeSet |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
virtual void BuildFromLegacyData
(
TUniquePtr< FStaticMeshInstanceData >&& ExternalLegacyData, |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
bool CheckPlatformFeatureLevel
(
FStaticShaderPlatform InShaderPlatform, |
Make sure the shader platform & feature levels match. | InstancedStaticMesh/ISMInstanceDataSceneProxy.h | |
const FInstanceSceneDataBuffers & GetData() |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
virtual void Update
(
FISMInstanceUpdateChangeSet&& ChangeSet |
Overridable functions to update / build proxy data from a change set. | InstancedStaticMesh/ISMInstanceDataSceneProxy.h | |
virtual void UpdatePrimitiveTransform
(
FISMInstanceUpdateChangeSet&& ChangeSet |
Handle only updating the primitive transform, could make use of special cases such as translation only if implemented properly. | InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
Overridden from FInstanceDataSceneProxy
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DebugDrawInstanceChanges
(
FPrimitiveDrawInterface* DebugPDI, |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
virtual FInstanceDataUpdateTaskInfo * GetUpdateTaskInfo() |
Implement to provide syncable task info, if this returns a nullptr it is required that GeInstanceSceneDataBuffers() performs any needed synchronization. | InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyAttributeChanges
(
FISMInstanceUpdateChangeSet& ChangeSet, |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
void ApplyDataChanges
(
FISMInstanceUpdateChangeSet& ChangeSet, |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
void BuildFromOptimizedDataBuffers
(
FISMInstanceUpdateChangeSet& ChangeSet, |
Build an optimized instance buffer, where the order is sorted such that instances with the same spatial hash are consecutive. | InstancedStaticMesh/ISMInstanceDataSceneProxy.h | |
void TestAndApplyInstanceBufferSizeFixup
(
int32 PostUpdateNumInstances |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h | ||
void UpdateIdMapping
(
FISMInstanceUpdateChangeSet& ChangeSet, |
Update the InstanceIdIndexMap given the change set. | InstancedStaticMesh/ISMInstanceDataSceneProxy.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FVector3f GetLocalBoundsPadExtent
(
const FRenderTransform& LocalToWorld, |
InstancedStaticMesh/ISMInstanceDataSceneProxy.h |