engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
FStaticMeshSceneProxy类 参考

A static mesh component scene proxy. 更多...

#include <StaticMeshResources.h>

+ 类 FStaticMeshSceneProxy 继承关系图:

类

class  FLODInfo
 Information used by the proxy about a single LOD of the mesh. 更多...
 

Public 成员函数

virtual bool CanBeOccluded () const override
 
virtual int32 CollectOccluderElements (class FOccluderElementsCollector &Collector) const override
 Collects occluder geometry for software occlusion culling
 
virtual void CreateRenderThreadResources () override
 Called when the rendering thread adds the proxy to the scene. 更多...
 
virtual void DestroyRenderThreadResources () override
 Called when the rendering thread removes the proxy from the scene. 更多...
 
virtual void DrawStaticElements (FStaticPrimitiveDrawInterface *PDI) override
 Draws the primitive's static elements. 更多...
 
 FStaticMeshSceneProxy (UStaticMeshComponent *Component, bool bForceLODsShareStaticLighting)
 Initialization constructor.
 
virtual bool GetCollisionMeshElement (int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, const FMaterialRenderProxy *RenderProxy, FMeshBatch &OutMeshBatch) const
 Sets up a collision FMeshBatch for a specific LOD and element.
 
virtual void GetDynamicMeshElements (const TArray< const FSceneView * > &Views, const FSceneViewFamily &ViewFamily, uint32 VisibilityMap, FMeshElementCollector &Collector) const override
 Gathers the primitive's dynamic mesh elements. 更多...
 
virtual void GetLightRelevance (const FLightSceneProxy *LightSceneProxy, bool &bDynamic, bool &bRelevant, bool &bLightMapped, bool &bShadowMapped) const override
 Determines the relevance of this primitive's elements to the given light. 更多...
 
virtual int32 GetLOD (const FSceneView *View) const override
 Returns the LOD that the primitive will render at for this view.
 
FLODMask GetLODMask (const FSceneView *View) const
 Returns the LOD mask for a view, this is like the ordinary LOD but can return two values for dither fading
 
virtual uint32 GetMemoryFootprint (void) const override
 Every derived class should override these functions
 
virtual void GetMeshDescription (int32 LODIndex, TArray< FMeshBatch > &OutMeshElements) const override
 Gathers a description of the mesh elements to be rendered for the given LOD index, without consideration for views.
 
virtual bool GetMeshElement (int32 LODIndex, int32 BatchIndex, int32 ElementIndex, uint8 InDepthPriorityGroup, bool bUseSelectionOutline, bool bAllowPreCulledIndices, FMeshBatch &OutMeshBatch) const
 Sets up a FMeshBatch for a specific LOD and element.
 
virtual int32 GetNumMeshBatches () const
 Gets the number of mesh batches required to represent the proxy, aside from section needs.
 
float GetScreenSize (int32 LODIndex) const
 Returns the display factor for the given LOD level 更多...
 
virtual bool GetShadowMeshElement (int32 LODIndex, int32 BatchIndex, uint8 InDepthPriorityGroup, FMeshBatch &OutMeshBatch, bool bDitheredLODTransition) const
 Sets up a shadow FMeshBatch for a specific LOD.
 
SIZE_T GetTypeHash () const override
 Return a type (or subtype) specific hash for sorting purposes
 
virtual FPrimitiveViewRelevance GetViewRelevance (const FSceneView *View) const override
 Determines the relevance of this primitive's elements to the given view. 更多...
 
virtual bool GetWireframeMeshElement (int32 LODIndex, int32 BatchIndex, const FMaterialRenderProxy *WireframeRenderProxy, uint8 InDepthPriorityGroup, bool bAllowPreCulledIndices, FMeshBatch &OutMeshBatch) const
 Sets up a wireframe FMeshBatch for a specific LOD.
 
virtual bool IsUsingDistanceCullFade () const override
 
- Public 成员函数 继承自 FPrimitiveSceneProxy
virtual void AcceptOcclusionResults (const FSceneView *View, TArray< bool > *Results, int32 ResultsStart, int32 NumResults)
 Gives the primitive the results of sub-occlusion-queries 更多...
 
virtual ENGINE_API void ApplyLateUpdateTransform (const FMatrix &LateUpdateTransform)
 Applies a "late in the frame" adjustment to the proxy's existing transform 更多...
 
virtual ENGINE_API void ApplyWorldOffset (FVector InOffset)
 Shifts primitive position and all relevant data by an arbitrary delta. 更多...
 
virtual bool CanBeOccluded () const
 
virtual int32 CollectOccluderElements (class FOccluderElementsCollector &Collector) const
 Collects occluder geometry for software occlusion culling
 
virtual ENGINE_API HHitProxy * CreateHitProxies (UPrimitiveComponent *Component, TArray< TRefCountPtr< HHitProxy > > &OutHitProxies)
 Creates the hit proxies are used when DrawDynamicElements is called. 更多...
 
virtual void CreateRenderThreadResources ()
 Called when the rendering thread adds the proxy to the scene. 更多...
 
virtual void DestroyRenderThreadResources ()
 Called when the rendering thread removes the proxy from the scene. 更多...
 
virtual void DrawStaticElements (FStaticPrimitiveDrawInterface *PDI)
 Draws the primitive's static elements. 更多...
 
bool DrawsVelocity () const
 Returns whether draws velocity in base pass.
 
ENGINE_API FPrimitiveSceneProxy (const UPrimitiveComponent *InComponent, FName ResourceName=NAME_None)
 Initialization constructor.
 
virtual void GatherSimpleLights (const FSceneViewFamily &ViewFamily, FSimpleLightArray &OutParticleLights) const
 Callback from the renderer to gather simple lights that this proxy wants renderered.
 
virtual FBoxSphereBounds GetCustomOcclusionBounds () const
 Return the custom occlusion bounds for this scene proxy. 更多...
 
ENGINE_API const FCustomPrimitiveData * GetCustomPrimitiveData () const
 Get the custom primitive data for this scene proxy. 更多...
 
uint8 GetDepthPriorityGroup (const FSceneView *View) const
 Determines the DPG to render the primitive in for the given view. 更多...
 
virtual void GetDynamicMeshElements (const TArray< const FSceneView * > &Views, const FSceneViewFamily &ViewFamily, uint32 VisibilityMap, class FMeshElementCollector &Collector) const
 Gathers the primitive's dynamic mesh elements. 更多...
 
virtual int32 GetLightMapResolution () const
 Get the lightmap resolution for this primitive. 更多...
 
virtual void GetLightRelevance (const FLightSceneProxy *LightSceneProxy, bool &bDynamic, bool &bRelevant, bool &bLightMapped, bool &bShadowMapped) const
 Determines the relevance of this primitive's elements to the given light. 更多...
 
virtual int32 GetLOD (const FSceneView *View) const
 Returns the LOD that the primitive will render at for this view.
 
virtual uint32 GetMemoryFootprint (void) const =0
 Every derived class should override these functions
 
virtual void GetMeshDescription (int32 LODIndex, TArray< FMeshBatch > &OutMeshElements) const
 Gathers a description of the mesh elements to be rendered for the given LOD index, without consideration for views.
 
virtual const TArray< FBoxSphereBounds > * GetOcclusionQueries (const FSceneView *View) const
 Gets the boxes for sub occlusion queries 更多...
 
virtual void GetShadowShapes (TArray< FCapsuleShape > &CapsuleShapes) const
 Gathers shadow shapes from this proxy.
 
virtual uint8 GetStaticDepthPriorityGroup () const
 Determines the DPG to render the primitive in regardless of view. 更多...
 
virtual ENGINE_API SIZE_T GetTypeHash () const =0
 Return a type (or subtype) specific hash for sorting purposes
 
virtual ENGINE_API FPrimitiveViewRelevance GetViewRelevance (const FSceneView *View) const
 Determines the relevance of this primitive's elements to the given view. 更多...
 
virtual bool HasCustomOcclusionBounds () const
 Returns whether the proxy utilizes custom occlusion bounds or not 更多...
 
virtual bool HasSubprimitiveOcclusionQueries () const
 
virtual bool IsDetailMesh () const
 Returns whether this proxy should be considered a "detail mesh". 更多...
 
virtual ENGINE_API bool IsDrawnInGame () const
 Tell us if this proxy is drawn in game.
 
ENGINE_API bool IsShadowCast (const FSceneView *View) const
 
ENGINE_API bool IsShown (const FSceneView *View) const
 
virtual bool IsUsingDistanceCullFade () const
 
virtual void OnDetachLight (const FLightSceneInfo *Light)
 Called by the rendering thread to notify the proxy when a light is no longer associated with the proxy, so that it can clean up any cached resources. 更多...
 
virtual void OnLevelAddedToWorld ()
 Called to notify the proxy that the level has been fully added to the world and the primitive will now be rendered. 更多...
 
virtual void OnTransformChanged ()
 Called to notify the proxy when its transform has been updated. 更多...
 
ENGINE_API void RenderBounds (FPrimitiveDrawInterface *PDI, const FEngineShowFlags &EngineShowFlags, const FBoxSphereBounds &Bounds, bool bRenderInEditor) const
 Helper for components that want to render bounds.
 
void SetCollisionEnabled_GameThread (const bool bNewEnabled)
 Set the collision flag on the scene proxy to enable/disable collision drawing 更多...
 
void SetCollisionEnabled_RenderThread (const bool bNewEnabled)
 Set the collision flag on the scene proxy to enable/disable collision drawing (RENDER THREAD) 更多...
 
void SetCustomDepthEnabled_GameThread (const bool bInRenderCustomDepth)
 Set the custom depth enabled flag 更多...
 
void SetCustomDepthEnabled_RenderThread (const bool bInRenderCustomDepth)
 Set the custom depth enabled flag (RENDER THREAD) 更多...
 
void SetCustomDepthStencilValue_GameThread (const int32 InCustomDepthStencilValue)
 Set the custom depth stencil value 更多...
 
void SetCustomDepthStencilValue_RenderThread (const int32 InCustomDepthStencilValue)
 Set the custom depth stencil value (RENDER THREAD) 更多...
 
virtual ENGINE_API void SetDebugMassData (const TArray< FDebugMassData > &InDebugMassData)
 Sets the primitive proxy's mass space to component space. 更多...
 
void SetHiddenEdViews_GameThread (uint64 InHiddenEditorViews)
 Updates the hidden editor view visibility map on the game thread which just enqueues a command on the render thread
 
void SetHovered_GameThread (const bool bInHovered)
 Updates hover state for the primitive proxy. 更多...
 
void SetLightingChannels_GameThread (FLightingChannels LightingChannels)
 Updates the lighting channels for the primitive proxy.
 
void SetSelection_GameThread (const bool bInParentSelected, const bool bInIndividuallySelected=false)
 Updates selection for the primitive proxy. 更多...
 
ENGINE_API void UpdateUniformBuffer ()
 Updates the primitive proxy's uniform buffer.
 
ENGINE_API bool VerifyUsedMaterial (const class FMaterialRenderProxy *MaterialRenderProxy) const
 Verifies that a material used for rendering was present in the component's GetUsedMaterials list.
 
virtual ENGINE_API ~FPrimitiveSceneProxy ()
 Virtual destructor.
 

Protected 成员函数

uint8 GetCurrentFirstLODIdx_Internal () const
 Only call on render thread timeline
 
bool IsReversedCullingNeeded (bool bUseReversedIndices) const
 Returns whether this mesh needs reverse culling when using reversed indices.
 
uint32 SetMeshElementGeometrySource (int32 LODIndex, int32 ElementIndex, bool bWireframe, bool bRequiresAdjacencyInformation, bool bUseInversedIndices, bool bAllowPreCulledIndices, const FVertexFactory *VertexFactory, FMeshBatch &OutMeshElement) const
 Configures mesh batch vertex / index state. 更多...
 
void SetMeshElementScreenSize (int32 LODIndex, bool bDitheredLODTransition, FMeshBatch &OutMeshBatch) const
 Sets the screen size on a mesh element.
 
- Protected 成员函数 继承自 FPrimitiveSceneProxy
bool DrawInVirtualTextureOnly (bool bEditor) const
 Returns true if primitive should be hidden because it is drawn only to the runtime virtual texture.
 
void OverrideOwnerName (FName InOwnerName)
 Allow subclasses to override the primitive name. 更多...
 
void SetHovered_RenderThread (const bool bInHovered)
 Updates hover state for the primitive proxy. 更多...
 
void SetSelection_RenderThread (const bool bInParentSelected, const bool bInIndividuallySelected)
 Updates selection for the primitive proxy. 更多...
 

Protected 属性

uint32 bReverseCulling: 1
 This primitive has culling reversed
 
int32 ClampedMinLOD
 Minimum LOD index to use. 更多...
 
int32 ForcedLodModel
 The forcedLOD set in the static mesh editor, copied from the mesh component
 
FMaterialRelevance MaterialRelevance
 The view relevance for all the static mesh's materials.
 
- Protected 属性 继承自 FPrimitiveSceneProxy
uint8 bAffectDynamicIndirectLighting: 1
 True if the primitive casts Reflective Shadow Map shadows (meaning it affects Light Propagation Volumes).
 
uint8 bAlwaysHasVelocity: 1
 Whether the primitive should always be considered to have velocities, even if it hasn't moved.
 
uint8 bCastCapsuleDirectShadow: 1
 Whether the primitive should use capsules for direct shadowing, if present. 更多...
 
uint8 bCastCinematicShadow: 1
 Whether this component should create a per-object shadow that gives higher effective shadow resolution. 更多...
 
uint8 bCastContactShadow: 1
 Whether the object should cast a contact shadow
 
uint8 bCastDynamicShadow: 1
 True if the primitive casts dynamic shadows.
 
uint8 bCastHiddenShadow: 1
 True if the primitive casts shadows even when hidden.
 
uint8 bCastInsetShadow: 1
 Whether this component should create a per-object shadow that gives higher effective shadow resolution. 更多...
 
uint8 bCastsDynamicIndirectShadow: 1
 Whether the primitive should use an inset indirect shadow from capsules or mesh distance fields.
 
uint8 bCastShadowAsTwoSided: 1
 Whether this primitive should cast dynamic shadows as if it were a two sided material.
 
uint8 bCastStaticShadow: 1
 True if the primitive casts static shadows.
 
uint8 bCastVolumetricTranslucentShadow: 1
 Whether the object should cast a volumetric translucent shadow. 更多...
 
uint8 bGoodCandidateForCachedShadowmap: 1
 Whether this proxy's mesh is unlikely to be constantly changing.
 
uint8 bHasValidSettingsForStaticLighting: 1
 True if the primitive wants to use static lighting, but has invalid content settings to do so.
 
uint8 bLightAttachmentsAsGroup: 1
 Whether to light this component and any attachments as a group. 更多...
 
uint8 bNeedsLevelAddedToWorldNotification: 1
 Whether this primitive requires notification when its level is added to the world and made visible for the first time.
 
uint8 bNeedsUnbuiltPreviewLighting: 1
 Whether the primitive should be statically lit but has unbuilt lighting, and a preview should be used.
 
uint8 bSelfShadowOnly: 1
 When enabled, the component will only cast a shadow on itself and not other components in the world. 更多...
 
uint8 bSingleSampleShadowFromStationaryLights: 1
 Whether the whole component should be shadowed as one from stationary lights, which makes shadow receiving much cheaper. 更多...
 
uint8 bStaticElementsAlwaysUseProxyPrimitiveUniformBuffer: 1
 Whether this proxy always uses UniformBuffer and no other uniform buffers. 更多...
 
uint8 bSupportsDistanceFieldRepresentation: 1
 Whether the primitive type supports a distance field representation. 更多...
 
uint8 bSupportsHeightfieldRepresentation: 1
 Whether the primitive implements GetHeightfieldRepresentation()
 
uint8 bVFRequiresPrimitiveUniformBuffer: 1
 Whether this proxy ever draws with vertex factories that require a primitive uniform buffer. 更多...
 
uint8 bWantsSelectionOutline: 1
 true by default, if set to false will make given proxy never drawn with selection outline
 
uint8 bWillEverBeLit: 1
 Can be set to false to skip some work only needed on lit primitives.
 
float DynamicIndirectShadowMinVisibility
 Min visibility for capsule shadows.
 
TEnumAsByte< EIndirectLightingCacheQuality > IndirectLightingCacheQuality
 Quality of interpolated indirect lighting for Movable components.
 
float LpvBiasMultiplier
 The bias applied to LPV injection
 
TArray< ERuntimeVirtualTextureMaterialType > RuntimeVirtualTextureMaterialTypes
 Set of unique runtime virtual texture material types referenced by RuntimeVirtualTextures.
 
TArray< URuntimeVirtualTexture * > RuntimeVirtualTextures
 Array of runtime virtual textures that this proxy should render to.
 
int8 VirtualTextureCullMips
 Number of low mips to skip when rendering to runtime virtual texture.
 
int8 VirtualTextureLodBias
 Geometry Lod bias when rendering to runtime virtual texture.
 
int8 VirtualTextureMinCoverage
 Log2 of minimum estimated pixel coverage before culling from runtime virtual texture.
 

额外继承的成员函数

- Public 类型 继承自 FPrimitiveSceneProxy
typedef TArray< class FLightCacheInterface *, TInlineAllocator< 8 > > FLCIArray
 Get the list of LCIs. 更多...
 
- 静态 Public 成员函数 继承自 FPrimitiveSceneProxy
static ENGINE_API void DrawArc (FPrimitiveDrawInterface *PDI, const FVector &Start, const FVector &End, const float Height, const uint32 Segments, const FLinearColor &Color, uint8 DepthPriorityGroup, const float Thickness=0.0f, const bool bScreenSpace=false)
 Drawing helper. 更多...
 

详细描述

A static mesh component scene proxy.

成员函数说明

◆ CanBeOccluded()

virtual bool FStaticMeshSceneProxy::CanBeOccluded ( ) const
overridevirtual
返回
true if the proxy can be culled when occluded by other primitives

重载 FPrimitiveSceneProxy .

◆ CreateRenderThreadResources()

virtual void FStaticMeshSceneProxy::CreateRenderThreadResources ( )
overridevirtual

Called when the rendering thread adds the proxy to the scene.

This function allows for generating renderer-side resources. Called in the rendering thread.

重载 FPrimitiveSceneProxy .

◆ DestroyRenderThreadResources()

virtual void FStaticMeshSceneProxy::DestroyRenderThreadResources ( )
overridevirtual

Called when the rendering thread removes the proxy from the scene.

This function allows for removing renderer-side resources. Called in the rendering thread.

重载 FPrimitiveSceneProxy .

◆ DrawStaticElements()

virtual void FStaticMeshSceneProxy::DrawStaticElements ( FStaticPrimitiveDrawInterface *  PDI)
overridevirtual

Draws the primitive's static elements.

This is called from the rendering thread once when the scene proxy is created. The static elements will only be rendered if GetViewRelevance declares static relevance.

参数
PDI- The interface which receives the primitive elements.

重载 FPrimitiveSceneProxy .

◆ GetDynamicMeshElements()

virtual void FStaticMeshSceneProxy::GetDynamicMeshElements ( const TArray< const FSceneView * > &  Views,
const FSceneViewFamily &  ViewFamily,
uint32  VisibilityMap,
FMeshElementCollector &  Collector 
) const
overridevirtual

Gathers the primitive's dynamic mesh elements.

This will only be called if GetViewRelevance declares dynamic relevance. This is called from the rendering thread for each set of views that might be rendered.
Game thread state like UObjects must have their properties mirrored on the proxy to avoid race conditions. The rendering thread must not dereference UObjects. The gathered mesh elements will be used multiple times, any memory referenced must last as long as the Collector (eg no stack memory should be referenced). This function should not modify the proxy but simply collect a description of things to render. Updates to the proxy need to be pushed from game thread or external events.

参数
Views- the array of views to consider. These may not exist in the ViewFamily.
ViewFamily- the view family, for convenience
VisibilityMap- a bit representing this proxy's visibility in the Views array
Collector- gathers the mesh elements to be rendered and provides mechanisms for temporary allocations

重载 FPrimitiveSceneProxy .

◆ GetLightRelevance()

virtual void FStaticMeshSceneProxy::GetLightRelevance ( const FLightSceneProxy *  LightSceneProxy,
bool &  bDynamic,
bool &  bRelevant,
bool &  bLightMapped,
bool &  bShadowMapped 
) const
overridevirtual

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

参数
LightSceneProxyThe light to determine relevance for
bDynamic(output) The light is dynamic for this primitive
bRelevant(output) The light is relevant for this primitive
bLightMapped(output) The light is light mapped for this primitive

重载 FPrimitiveSceneProxy .

◆ GetScreenSize()

float FStaticMeshSceneProxy::GetScreenSize ( int32  LODIndex) const

Returns the display factor for the given LOD level

@Param LODIndex - The LOD to get the display factor for

◆ GetViewRelevance()

virtual FPrimitiveViewRelevance FStaticMeshSceneProxy::GetViewRelevance ( const FSceneView *  View) const
overridevirtual

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

Called in the rendering thread.

参数
View- The view to determine relevance for.
返回
The relevance of the primitive's elements to the view.

重载 FPrimitiveSceneProxy .

被 FSplineMeshSceneProxy 重载.

◆ IsUsingDistanceCullFade()

virtual bool FStaticMeshSceneProxy::IsUsingDistanceCullFade ( ) const
overridevirtual
返回
true if the proxy uses distance cull fade.

重载 FPrimitiveSceneProxy .

◆ SetMeshElementGeometrySource()

uint32 FStaticMeshSceneProxy::SetMeshElementGeometrySource ( int32  LODIndex,
int32  ElementIndex,
bool  bWireframe,
bool  bRequiresAdjacencyInformation,
bool  bUseInversedIndices,
bool  bAllowPreCulledIndices,
const FVertexFactory *  VertexFactory,
FMeshBatch &  OutMeshElement 
) const
protected

Configures mesh batch vertex / index state.

Returns the number of primitives used in the element.

类成员变量说明

◆ ClampedMinLOD

int32 FStaticMeshSceneProxy::ClampedMinLOD
protected

Minimum LOD index to use.

Clamped to valid range [0, NumLODs - 1].


该类的文档由以下文件生成: