FPrimitiveSceneInfo

The renderer's internal state for a single [UPrimitiveComponent](API\Runtime\Engine\Components\UPrimitiveComponent).

Windows
MacOS
Linux

Inheritance Hierarchy

FDeferredCleanupInterface

FPrimitiveSceneInfo

References

Module

Renderer

Header

/Engine/Source/Runtime/Renderer/Public/PrimitiveSceneInfo.h

Include

#include "PrimitiveSceneInfo.h"

Syntax

class FPrimitiveSceneInfo : public FDeferredCleanupInterface

Remarks

The renderer's internal state for a single UPrimitiveComponent. This has a one to one mapping with FPrimitiveSceneProxy, which is in the engine module.

Variables

Name Description

Public variable

uint32: 1

 

bNeedsCachedReflectionCaptureUpdate

Whether the primitive is newly registered or moved and CachedReflectionCaptureProxy needs to be updated on the next render.

Public variable

bool: 1

 

bShouldRenderInMainPass

Set to true for the primitive to be rendered in the main pass to be visible in a view.

Public variable

bool: 1

 

bVisibleInRealTimeSkyCapture

Set to true for the primitive to be rendered into the real-time sky light reflection capture.

Public variable

const FPlanarRe...

 

CachedPlanarReflectionProxy

Planar reflection that was closest to this primitive, used for forward reflections.

Public variable

const FReflecti...

 

CachedReflectionCaptureProxies

Public variable

const FReflecti...

 

CachedReflectionCaptureProxy

Reflection capture proxy that was closest to this primitive, used for the forward shading rendering path.

Public variable

HHitProxy *

 

DefaultDynamicHitProxy

The hit proxy which is used to represent the primitive's dynamic elements.

Public variable

FHitProxyId

 

DefaultDynamicHitProxyId

The ID of the hit proxy which is used to represent the primitive's dynamic elements.

Public variable

TArray< int32, ...

 

DistanceFieldInstanceIndices

Mapping from instance index in this primitive to index in the global distance field object buffers.

Public variable

TArray< TRefCou...

 

HitProxies

The hit proxies used by the primitive.

Public variable

const FIndirect...

 

IndirectLightingCacheAllocation

Caches the primitive's indirect lighting cache allocation.

Public variable

TUniformBufferR...

 

IndirectLightingCacheUniformBuffer

The uniform buffer holding precomputed lighting parameters for the indirect lighting cache allocation.

Public variable

float

 

LastRenderTime

Last render time in seconds since level started play.

Public variable

FPrimitiveCompo...

 

LightingAttachmentRoot

The root attachment component id for use with lighting, if valid.

Public variable

FLightPrimitive...

 

LightList

The list of lights affecting this primitive.

Public variable

FPrimitiveCompo...

 

LODParentComponentId

The component id of the LOD parent if valid.

Public variable

int32

 

NumMobileMovablePointLights

The number of movable point lights for mobile

Public variable

FOctreeElementI...

 

OctreeId

The identifier for the primitive in Scene->PrimitiveOctree.

Public variable

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.

Public variable

FPrimitiveCompo...

 

PrimitiveComponentId

Id for the component this primitive belongs to.

Public variable

FPrimitiveScene...

 

Proxy

The render proxy for the primitive.

Public variable

FScene *

 

Scene

The scene the primitive is in.

Public variable

TArray< class F...

 

StaticMeshCommandInfos

The primitive's cached mesh draw commands infos for all static meshes.

Public variable

TArray< class F...

 

StaticMeshes

The primitive's static meshes.

Public variable

TArray< class F...

 

StaticMeshRelevances

The primitive's static mesh relevances.

Constructors

Name Description

Public function

FPrimitiveSceneInfo

(
    UPrimitiveComponent* InPrimiti...,
    FScene* InScene
)

Initialization constructor.

Destructors

Name Description

Public function

~FPrimitiveSceneInfo()

Destructor.

Functions

Name Description

Public function Static

void

 

AddStaticMeshes

(
    FRHICommandListImmediate& RHICmdLi...,
    FScene* Scene,
    const TArrayView< FPrimitiveSceneIn...,
    bool bUpdateStaticDrawLists
)

Adds the primitive's static meshes to the scene.

Public function Static

void

 

AddToScene

(
    FRHICommandListImmediate& RHICmdLi...,
    FScene* Scene,
    const TArrayView< FPrimitiveSceneIn...,
    bool bUpdateStaticDrawLists,
    bool bAddToStaticDrawLists,
    bool bAsyncCreateLPIs
)

Adds the primitive to the scene.

Public function

void

 

ApplyWorldOffset

(
    FVector InOffset
)

Shifts primitive position and all relevant data by an arbitrary delta.

Public function

void

 

BeginDeferredUpdateStaticMeshes()

Sets a flag to update the primitive's static meshes before it is next rendered.

Public function

void

 

BeginDeferredUpdateStaticMeshesWithoutVisibilityCheck()

Will update static meshes during next InitViews, even if it's not visible.

Public function

void

 

CacheReflectionCaptures()

Cache per-primitive reflection captures used for mobile/forward rendering.

Public function

void

 

ConditionalUpdateUniformBuffer

(
    FRHICommandListImmediate& RHICmdLi...
)

Updates the primitive's uniform buffer.

Public function

void

 

FlushRuntimeVirtualTexture()

Mark the runtime virtual textures covered by this primitive as dirty.

Public function

void

 

GatherLightingAttachmentGroupPrimitives

(
    TArray< FPrimitiveSceneInfo*, ...
)

Builds an array of all primitive scene info's in this primitive's attachment group.

Public function Const

void

 

GatherLightingAttachmentGroupPrimitives

(
    TArray< const FPrimitiveSceneInfo&...
)

Builds an array of all primitive scene info's in this primitive's attachment group.

Public function Const

FBoxSphereBo...

 

GetAttachmentGroupBounds()

Builds a cumulative bounding box of this primitive and all the primitives in the same attachment group.

Public function Const

int32

 

GetIndex()

Retrieves the index of the primitive in the scene's primitives array.

Public function Const

const int32 ...

 

GetIndexAddress()

Retrieves the address of the primitives index into in the scene's primitives array.

Public function Const

int32

 

GetLightmapDataOffset()

Public function

uint32

 

GetMemoryFootprint()

Size this class uses in bytes

Public function Const

const FMeshB...

 

GetMeshBatch

(
    int8 InLODIndex
)

Will output the FMeshBatch associated with the specified LODIndex.

Public function Const

int32

 

GetNumLightmapDataEntries()

Public function Const

FPrimitiveVi...

 

GetRuntimeVirtualTextureFlags()

Get the cached runtime virtual texture flags for this primitive.

Public function Const

void

 

GetStaticMeshesLODRange

(
    int8& OutMinLOD,
    int8& OutMaxLOD
)

Will output the LOD ranges of the static meshes used with this primitive.

Public function Const

bool

 

IsIndexValid()

Simple comparison against the invalid values used before/after scene add/remove.

Public function

void

 

LinkAttachmentGroup()

Adds the primitive to the scene's attachment groups.

Public function

void

 

LinkLODParentComponent()

Set LOD Parent primitive information to the scene.

Public function

void

 

MarkIndirectLightingCacheBufferDirty()

Public function

bool

 

NeedsIndirectLightingCacheBufferUpdate()

Return true if we need to call LazyUpdateForRendering

Public function Const

bool

 

NeedsReflectionCaptureUpdate()

Returns whether the primitive needs to call CacheReflectionCaptures.

Public function Const

bool

 

NeedsUniformBufferUpdate()

Return true if we need to call LazyUpdateForRendering

Public function

bool

 

NeedsUpdateStaticMeshes()

Return true if we need to call ConditionalUpdateStaticMeshes

Public function

void

 

RemoveCachedReflectionCaptures()

Nulls out the cached per-primitive reflection captures.

Public function

void

 

RemoveFromScene

(
    bool bUpdateStaticDrawLists
)

Removes the primitive from the scene.

Public function

void

 

RemoveStaticMeshes()

Removes the primitive's static meshes from the scene.

Public function

void

 

SetNeedsUniformBufferUpdate

(
    bool bInNeedsUniformBufferUpdate
)

Public function

void

 

UnlinkAttachmentGroup()

Removes the primitive from the scene's attachment groups.

Public function

void

 

UnlinkLODParentComponent()

Clear LOD parent primitive information from the scene.

Public function Const

void

 

UpdateComponentLastRenderTime

(
    float CurrentWorldTime,
    bool bUpdateLastRenderTimeOnScreen
)

Helper function for writing out to the last render times to the game thread

Public function

void

 

UpdateIndirectLightingCacheBuffer()

Public function

void

 

UpdateRuntimeVirtualTextureFlags()

Update the cached runtime virtual texture flags for this primitive.

Public function

int32

 

UpdateStaticLightingBuffer()

Updates static lighting uniform buffer, returns the number of entries needed for GPUScene

Public function Static

void

 

UpdateStaticMeshes

(
    FRHICommandListImmediate& RHICmdLi...,
    FScene* Scene,
    const TArrayView< FPrimitiveSceneIn...,
    bool bReAddToDrawLists
)

Updates the primitive's static meshes in the scene.

Public function

void

 

UpdateUniformBuffer

(
    FRHICommandListImmediate& RHICmdLi...
)

Updates the primitive's uniform buffer.

Constants

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss