The renderer's internal state for a single UPrimitiveComponent. 更多...
#include <PrimitiveSceneInfo.h>
类 FPrimitiveSceneInfo 继承关系图:Public 成员函数 | |
| void | ApplyWorldOffset (FVector InOffset) |
| Shifts primitive position and all relevant data by an arbitrary delta. 更多... | |
| void | BeginDeferredUpdateStaticMeshes () |
| Sets a flag to update the primitive's static meshes before it is next rendered. | |
| void | BeginDeferredUpdateStaticMeshesWithoutVisibilityCheck () |
| Will update static meshes during next InitViews, even if it's not visible. | |
| void | CacheReflectionCaptures () |
| Cache per-primitive reflection captures used for mobile/forward rendering. | |
| FORCEINLINE void | ConditionalUpdateUniformBuffer (FRHICommandListImmediate &RHICmdList) |
| Updates the primitive's uniform buffer. | |
| void | FlushRuntimeVirtualTexture () |
| Mark the runtime virtual textures covered by this primitive as dirty. | |
| FPrimitiveSceneInfo (UPrimitiveComponent *InPrimitive, FScene *InScene) | |
| Initialization constructor. | |
| void | GatherLightingAttachmentGroupPrimitives (TArray< FPrimitiveSceneInfo *, SceneRenderingAllocator > &OutChildSceneInfos) |
| Builds an array of all primitive scene info's in this primitive's attachment group. 更多... | |
| FBoxSphereBounds | GetAttachmentGroupBounds () const |
| Builds a cumulative bounding box of this primitive and all the primitives in the same attachment group. 更多... | |
| RENDERER_API FORCEINLINE int32 | GetIndex () const |
| Retrieves the index of the primitive in the scene's primitives array. 更多... | |
| FORCEINLINE const int32 * | GetIndexAddress () const |
| Retrieves the address of the primitives index into in the scene's primitives array. 更多... | |
| uint32 | GetMemoryFootprint () |
| Size this class uses in bytes | |
| RENDERER_API const FMeshBatch * | GetMeshBatch (int8 InLODIndex) const |
| Will output the FMeshBatch associated with the specified LODIndex. | |
| FPrimitiveVirtualTextureFlags | GetRuntimeVirtualTextureFlags () const |
| Get the cached runtime virtual texture flags for this primitive. | |
| RENDERER_API void | GetStaticMeshesLODRange (int8 &OutMinLOD, int8 &OutMaxLOD) const |
| Will output the LOD ranges of the static meshes used with this primitive. | |
| FORCEINLINE bool | IsIndexValid () const |
| Simple comparison against the invalid values used before/after scene add/remove. | |
| void | LinkAttachmentGroup () |
| Adds the primitive to the scene's attachment groups. | |
| void | LinkLODParentComponent () |
| Set LOD Parent primitive information to the scene. | |
| FORCEINLINE bool | NeedsIndirectLightingCacheBufferUpdate () |
| return true if we need to call LazyUpdateForRendering | |
| bool | NeedsReflectionCaptureUpdate () const |
| Returns whether the primitive needs to call CacheReflectionCaptures. | |
| FORCEINLINE bool | NeedsUniformBufferUpdate () const |
| return true if we need to call LazyUpdateForRendering | |
| bool | NeedsUpdateStaticMeshes () |
| return true if we need to call ConditionalUpdateStaticMeshes | |
| void | RemoveCachedReflectionCaptures () |
| Nulls out the cached per-primitive reflection captures. | |
| void | RemoveFromScene (bool bUpdateStaticDrawLists) |
| Removes the primitive from the scene. | |
| void | RemoveStaticMeshes () |
| Removes the primitive's static meshes from the scene. | |
| void | UnlinkAttachmentGroup () |
| Removes the primitive from the scene's attachment groups. | |
| void | UnlinkLODParentComponent () |
| clear LOD parent primitive information from the scene. | |
| void | UpdateComponentLastRenderTime (float CurrentWorldTime, bool bUpdateLastRenderTimeOnScreen) const |
| Helper function for writing out to the last render times to the game thread | |
| void | UpdateRuntimeVirtualTextureFlags () |
| Update the cached runtime virtual texture flags for this primitive. 更多... | |
| RENDERER_API int32 | UpdateStaticLightingBuffer () |
| Updates static lighting uniform buffer, returns the number of entries needed for GPUScene | |
| void | UpdateUniformBuffer (FRHICommandListImmediate &RHICmdList) |
| Updates the primitive's uniform buffer. | |
| ~FPrimitiveSceneInfo () | |
| Destructor. | |
静态 Public 成员函数 | |
| static void | AddStaticMeshes (FRHICommandListImmediate &RHICmdList, FScene *Scene, const TArrayView< FPrimitiveSceneInfo * > &SceneInfos, bool bUpdateStaticDrawLists=true) |
| Adds the primitive's static meshes to the scene. | |
| static void | AddToScene (FRHICommandListImmediate &RHICmdList, FScene *Scene, const TArrayView< FPrimitiveSceneInfo * > &SceneInfos, bool bUpdateStaticDrawLists, bool bAddToStaticDrawLists=true, bool bAsyncCreateLPIs=false) |
| Adds the primitive to the scene. | |
| static void | UpdateStaticMeshes (FRHICommandListImmediate &RHICmdList, FScene *Scene, const TArrayView< FPrimitiveSceneInfo * > &SceneInfos, bool bReAddToDrawLists=true) |
| Updates the primitive's static meshes in the scene. | |
Public 属性 | |
| uint32 | bNeedsCachedReflectionCaptureUpdate: 1 |
| Whether the primitive is newly registered or moved and CachedReflectionCaptureProxy needs to be updated on the next render. | |
| bool | bShouldRenderInMainPass: 1 |
| Set to true for the primitive to be rendered in the main pass to be visible in a view. | |
| bool | bVisibleInRealTimeSkyCapture: 1 |
| Set to true for the primitive to be rendered into the real-time sky light reflection capture. | |
| const FPlanarReflectionSceneProxy * | CachedPlanarReflectionProxy |
| Planar reflection that was closest to this primitive, used for forward reflections. | |
| const FReflectionCaptureProxy * | CachedReflectionCaptureProxy |
| Reflection capture proxy that was closest to this primitive, used for the forward shading rendering path. | |
| HHitProxy * | DefaultDynamicHitProxy |
| The hit proxy which is used to represent the primitive's dynamic elements. | |
| FHitProxyId | DefaultDynamicHitProxyId |
| The ID of the hit proxy which is used to represent the primitive's dynamic elements. | |
| TArray< int32, TInlineAllocator< 1 > > | DistanceFieldInstanceIndices |
| Mapping from instance index in this primitive to index in the global distance field object buffers. | |
| TArray< TRefCountPtr< HHitProxy > > | HitProxies |
| The hit proxies used by the primitive. | |
| const FIndirectLightingCacheAllocation * | IndirectLightingCacheAllocation |
| Caches the primitive's indirect lighting cache allocation. 更多... | |
| TUniformBufferRef< FIndirectLightingCacheUniformParameters > | IndirectLightingCacheUniformBuffer |
| The uniform buffer holding precomputed lighting parameters for the indirect lighting cache allocation. 更多... | |
| float | LastRenderTime |
| Last render time in seconds since level started play. | |
| FPrimitiveComponentId | LightingAttachmentRoot |
| The root attachment component id for use with lighting, if valid. 更多... | |
| class FLightPrimitiveInteraction * | LightList |
| The list of lights affecting this primitive. | |
| FPrimitiveComponentId | LODParentComponentId |
| The component id of the LOD parent if valid. | |
| int32 | NumMobileMovablePointLights |
| The number of movable point lights for mobile | |
| FOctreeElementId2 | OctreeId |
| The identifier for the primitive in Scene->PrimitiveOctree. | |
| float * | OwnerLastRenderTime |
| Pointer to the last render time variable on the primitive's owning actor (if owned), which is written to by the RT and read by the GT. 更多... | |
| FPrimitiveComponentId | PrimitiveComponentId |
| Id for the component this primitive belongs to. 更多... | |
| FPrimitiveSceneProxy * | Proxy |
| The render proxy for the primitive. | |
| FScene * | Scene |
| The scene the primitive is in. | |
| TArray< class FCachedMeshDrawCommandInfo > | StaticMeshCommandInfos |
| The primitive's cached mesh draw commands infos for all static meshes. 更多... | |
| TArray< class FStaticMeshBatch > | StaticMeshes |
| The primitive's static meshes. | |
| TArray< class FStaticMeshBatchRelevance > | StaticMeshRelevances |
| The primitive's static mesh relevances. 更多... | |
友元 | |
| class | FScene |
| Let FScene have direct access to the Id. | |
The renderer's internal state for a single UPrimitiveComponent.
This has a one to one mapping with FPrimitiveSceneProxy, which is in the engine module.
| void FPrimitiveSceneInfo::ApplyWorldOffset | ( | FVector | InOffset | ) |
Shifts primitive position and all relevant data by an arbitrary delta.
Called on world origin changes
| InOffset | - The delta to shift by |
| void FPrimitiveSceneInfo::GatherLightingAttachmentGroupPrimitives | ( | TArray< FPrimitiveSceneInfo *, SceneRenderingAllocator > & | OutChildSceneInfos | ) |
Builds an array of all primitive scene info's in this primitive's attachment group.
This only works on potential parents (!LightingAttachmentRoot.IsValid()) and will include the current primitive in the output array.
| FBoxSphereBounds FPrimitiveSceneInfo::GetAttachmentGroupBounds | ( | ) | const |
Builds a cumulative bounding box of this primitive and all the primitives in the same attachment group.
This only works on potential parents (!LightingAttachmentRoot.IsValid()).
|
inline |
Retrieves the index of the primitive in the scene's primitives array.
This index is only valid until a primitive is added to or removed from the scene!
|
inline |
Retrieves the address of the primitives index into in the scene's primitives array.
This address is only for reference purposes
| void FPrimitiveSceneInfo::UpdateRuntimeVirtualTextureFlags | ( | ) |
Update the cached runtime virtual texture flags for this primitive.
Do this when runtime virtual textures are created or destroyed.
| const FIndirectLightingCacheAllocation* FPrimitiveSceneInfo::IndirectLightingCacheAllocation |
Caches the primitive's indirect lighting cache allocation.
Note: This is only valid during the rendering of a frame, not just once the primitive is attached.
| TUniformBufferRef<FIndirectLightingCacheUniformParameters> FPrimitiveSceneInfo::IndirectLightingCacheUniformBuffer |
The uniform buffer holding precomputed lighting parameters for the indirect lighting cache allocation.
WARNING : This can hold buffer valid for a single frame only, don't cache anywhere. See FPrimitiveSceneInfo::UpdateIndirectLightingCacheBuffer()
| FPrimitiveComponentId FPrimitiveSceneInfo::LightingAttachmentRoot |
The root attachment component id for use with lighting, if valid.
If the root id is not valid, this is a parent primitive.
| float* FPrimitiveSceneInfo::OwnerLastRenderTime |
Pointer to the last render time variable on the primitive's owning actor (if owned), which is written to by the RT and read by the GT.
The value of LastRenderTime will therefore not be deterministic due to race conditions, but the GT uses it in a way that allows this. Storing a pointer to the UObject member variable only works because UPrimitiveComponent and AActor has a mechanism to ensure it does not get deleted before the proxy (DetachFence). In general feedback from the renderer to the game thread like this should be avoided.
| FPrimitiveComponentId FPrimitiveSceneInfo::PrimitiveComponentId |
Id for the component this primitive belongs to.
This will stay the same for the lifetime of the component, so it can be used to identify the component across re-registers.
| TArray<class FCachedMeshDrawCommandInfo> FPrimitiveSceneInfo::StaticMeshCommandInfos |
The primitive's cached mesh draw commands infos for all static meshes.
Kept separately from StaticMeshes for cache efficiency inside InitViews.
| TArray<class FStaticMeshBatchRelevance> FPrimitiveSceneInfo::StaticMeshRelevances |
The primitive's static mesh relevances.
Must be in sync with StaticMeshes. Kept separately from StaticMeshes for cache efficiency inside InitViews.