FStaticMeshSceneProxy

A static mesh component scene proxy.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/StaticMeshResources.h

Include

#include "StaticMeshResources.h"

Syntax

class FStaticMeshSceneProxy : public FPrimitiveSceneProxy

Remarks

A static mesh component scene proxy.

Variables

Name Description

Protected variable

uint32: 1

 

bCastShadow

Protected variable

bool

 

bPerSectionSelection

Whether selection should be per section or per entire proxy.

Protected variable

uint32: 1

 

bReverseCulling

This primitive has culling reversed

Protected variable

int32

 

ClampedMinLOD

Minimum LOD index to use. Clamped to valid range [0, NumLODs - 1].

Protected variable

const FDistance...

 

DistanceFieldData

Protected variable

int32

 

ForcedLodModel

The forcedLOD set in the static mesh editor, copied from the mesh component

Protected variable

TIndirectArray<...

 

LODs

Protected variable

int32

 

MaterialIndexPreview

Index of the material to preview. If set to INDEX_NONE, all section will be rendered

Protected variable

FMaterialReleva...

 

MaterialRelevance

The view relevance for all the static mesh's materials.

Protected variable

TArray< uint32 ...

 

MaterialStreamingRelativeBoxes

Material bounds used for texture streaming.

Protected variable

FStaticMeshOccl...

 

OccluderData

Protected variable

FStaticMeshRend...

 

RenderData

Protected variable

int32

 

SectionIndexPreview

Index of the section to preview. If set to INDEX_NONE, all section will be rendered

Protected variable

float

 

StreamingDistanceMultiplier

The component streaming distance multiplier

Protected variable

float

 

StreamingTransformScale

The cached GetTextureStreamingTransformScale

Constructors

Name Description

Public function

FStaticMeshSceneProxy

(
    UStaticMeshComponent* Componen...,
    bool bForceLODsShareStaticLighting
)

Initialization constructor.

Destructors

Name Description

Public function Virtual

~FStaticMeshSceneProxy()

Functions

Name Description

Public function Const

uint32

 

GetAllocatedSize()

Public function Virtual Const

bool

 

GetCollisionMeshElement

(
    int32 LODIndex,
    int32 BatchIndex,
    int32 ElementIndex,
    uint8 InDepthPriorityGroup,
    const FMaterialRenderProxy* Re...,
    FMeshBatch& OutMeshBatch
)

Sets up a collision FMeshBatch for a specific LOD and element.

Protected function Const

uint8

 

GetCurrentFirstLODIdx_Internal()

Only call on render thread timeline

Public function Const

FLODMask

 

GetLODMask

(
    const FSceneView* View
)

Returns the LOD mask for a view, this is like the ordinary LOD but can return two values for dither fading

Public function Virtual Const

bool

 

GetMaterialTextureScales

(
    int32 LODIndex,
    int32 SectionIndex,
    const FMaterialRenderProxy* Ma...,
    FVector4* OneOverScales,
    FIntVector4* UVChannelIndices
)

Public function Virtual Const

bool

 

GetMeshElement

(
    int32 LODIndex,
    int32 BatchIndex,
    int32 ElementIndex,
    uint8 InDepthPriorityGroup,
    bool bUseSelectionOutline,
    bool bAllowPreCulledIndices,
    FMeshBatch& OutMeshBatch
)

Sets up a FMeshBatch for a specific LOD and element.

Public function Virtual Const

int32

 

GetNumMeshBatches()

Gets the number of mesh batches required to represent the proxy, aside from section needs.

Public function Const

float

 

GetScreenSize

(
    int32 LODIndex
)

Returns the display factor for the given LOD level

Public function Virtual Const

bool

 

GetShadowMeshElement

(
    int32 LODIndex,
    int32 BatchIndex,
    uint8 InDepthPriorityGroup,
    FMeshBatch& OutMeshBatch,
    bool bDitheredLODTransition
)

Sets up a shadow FMeshBatch for a specific LOD.

Public function Virtual Const

bool

 

GetWireframeMeshElement

(
    int32 LODIndex,
    int32 BatchIndex,
    const FMaterialRenderProxy* Wi...,
    uint8 InDepthPriorityGroup,
    bool bAllowPreCulledIndices,
    FMeshBatch& OutMeshBatch
)

Sets up a wireframe FMeshBatch for a specific LOD.

Protected function Const

bool

 

IsCollisionView

(
    const FEngineShowFlags& EngineShow...,
    bool& bDrawSimpleCollision,
    bool& bDrawComplexCollision
)

Protected function Const

bool

 

IsReversedCullingNeeded

(
    bool bUseReversedIndices
)

Returns whether this mesh needs reverse culling when using reversed indices.

Protected function Const

uint32

 

SetMeshElementGeometrySource

(
    int32 LODIndex,
    int32 ElementIndex,
    bool bWireframe,
    bool bRequiresAdjacencyInformation,
    bool bUseInversedIndices,
    bool bAllowPreCulledIndices,
    const FVertexFactory* VertexFa...,
    FMeshBatch& OutMeshElement
)

Configures mesh batch vertex / index state. Returns the number of primitives used in the element.

Protected function Const

void

 

SetMeshElementScreenSize

(
    int32 LODIndex,
    bool bDitheredLODTransition,
    FMeshBatch& OutMeshBatch
)

Sets the screen size on a mesh element.

Overridden from FPrimitiveSceneProxy

Name Description

Public function Virtual Const

bool

 

CanBeOccluded()

Public function Virtual Const

int32

 

CollectOccluderElements

(
    FOccluderElementsCollector& Collec...
)

Collects occluder geometry for software occlusion culling

Public function Virtual

HHitProxy &#...

 

CreateHitProxies

(
    UPrimitiveComponent* Component,
    TArray< TRefCountPtr< HHitProxy > >...
)

Creates the hit proxies are used when DrawDynamicElements is called. Called in the game thread.

Public function Virtual

void

 

DrawStaticElements

Draws the primitive's static elements.

Public function Virtual Const

uint8

 

GetCurrentFirstLODIdx_RenderThread()

Public function Virtual Const

void

 

GetDistancefieldAtlasData

(
    FBox& LocalVolumeBounds,
    FVector2D& OutDistanceMinMax,
    FIntVector& OutBlockMin,
    FIntVector& OutBlockSize,
    bool& bOutBuiltAsIfTwoSided,
    bool& bMeshWasPlane,
    float& SelfShadowBias,
    TArray< FMatrix >& ObjectLocalToWo...,
    bool& bOutThrottled
)

Public function Virtual Const

void

 

GetDistanceFieldInstanceInfo

(
    int32& NumInstances,
    float& BoundsSurfaceArea
)

Public function Virtual Const

void

 

GetDynamicMeshElements

(
    const TArray< const FSceneView*...,
    const FSceneViewFamily& ViewFamily,
    uint32 VisibilityMap,
    FMeshElementCollector& Collector
)

Gathers the primitive's dynamic mesh elements.

Public function Virtual

void

 

GetLCIs

(
    FLCIArray& LCIs
)

Public function Virtual Const

int32

 

GetLightMapResolution()

Get the lightmap resolution for this primitive. Used in VMI_LightmapDensity.

Public function Virtual Const

void

 

GetLightRelevance

(
    const FLightSceneProxy* LightS...,
    bool& bDynamic,
    bool& bRelevant,
    bool& bLightMapped,
    bool& bShadowMapped
)

Determines the relevance of this primitive's elements to the given light.

Public function Virtual Const

int32

 

GetLOD

(
    const FSceneView* View
)

Returns the LOD that the primitive will render at for this view.

Public function Virtual Const

uint32

 

GetMemoryFootprint()

Every derived class should override these functions

Public function Virtual Const

void

 

GetMeshDescription

(
    int32 LODIndex,
    TArray< FMeshBatch >& OutMeshEleme...
)

Gathers a description of the mesh elements to be rendered for the given LOD index, without consideration for views.

Public function Virtual Const

bool

 

GetMeshUVDensities

(
    int32 LODIndex,
    int32 SectionIndex,
    FVector4& WorldUVDensities
)

Get mesh UV density for a LOD-section.

Public function Virtual Const

bool

 

GetPrimitiveDistance

(
    int32 LODIndex,
    int32 SectionIndex,
    const FVector& ViewOrigin,
    float& PrimitiveDistance
)

Get primitive distance to view origin for a given LOD-section.

Public function Virtual Const

SIZE_T

 

GetTypeHash()

Return a type (or subtype) specific hash for sorting purposes

Public function Virtual Const

FPrimitiveVi...

 

GetViewRelevance

(
    const FSceneView* View
)

Determines the relevance of this primitive's elements to the given view.

Public function Virtual Const

bool

 

HasDistanceFieldRepresentation()

Public function Virtual Const

bool

 

HasDynamicIndirectShadowCasterRepresentation()

Public function Virtual Const

bool

 

IsUsingDistanceCullFade()

Classes

Name

Description

Protected class

FLODInfo

Information used by the proxy about a single LOD of the mesh.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback