FBaseDynamicMeshSceneProxy

[FBaseDynamicMeshSceneProxy](API\Runtime\GeometryFramework\Components\FBaseDynamicMeshSceneProxy) is an abstract base class for a Render Proxy for a [UBaseDynamicMeshComponent](API\Runtime\GeometryFramework\Components\UBaseDynamicMeshComponent), where the assumption is that mesh data will be stored in [FMeshRenderBufferSet](API\Runtime\GeometryFramework\Components\FMeshRenderBufferSet) instances

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FPrimitiveSceneProxy

FBaseDynamicMeshSceneProxy

References

Module

GeometryFramework

Header

/Engine/Source/Runtime/GeometryFramework/Public/Components/BaseDynamicMeshSceneProxy.h

Include

#include "Components/BaseDynamicMeshSceneProxy.h"

Syntax

class FBaseDynamicMeshSceneProxy : public FPrimitiveSceneProxy

Remarks

FBaseDynamicMeshSceneProxy is an abstract base class for a Render Proxy for a UBaseDynamicMeshComponent, where the assumption is that mesh data will be stored in FMeshRenderBufferSet instances

Variables

Name Description

Protected variable

TSet< FMeshRend...

 

AllocatedBufferSets

Set of currently-allocated RenderBuffers.

Protected variable

FCriticalSectio...

 

AllocatedSetsLock

Use to control access to AllocatedBufferSets

Protected variable

bool

 

bEnableRaytracing

Control raytracing support

Protected variable

bool

 

bEnableViewModeOverrides

Public variable

bool

 

bIgnoreVertexColors

If true, vertex colors on the FDynamicMesh will be ignored

Public variable

bool

 

bUsePerTriangleColor

If true, a per-triangle color is used to set vertex colors

Public variable

bool

 

bUseSecondaryTriBuffers

If true, populate secondary buffers using SecondaryTriFilterFunc

Public variable

FColor

 

ConstantVertexColor

Constant color assigned to vertices if no other vertex color is specified

Public variable

UBaseDynamicMes...

 

ParentBaseComponent

Public variable

TFunction< FCol...

 

PerTriangleColorFunc

Per-triangle color function. Only called if bUsePerTriangleColor=true

Public variable

TUniqueFunction...

 

SecondaryTriFilterFunc

Filter predicate for secondary triangle index buffer. Only called if bUseSecondaryTriBuffers=true

Constructors

Name Description

Public function

FBaseDynamicMeshSceneProxy

(
    UBaseDynamicMeshComponent* Com...
)

Destructors

Functions

Name Description

Public function Virtual

FMeshRenderB...

 

AllocateNewRenderBufferSet()

RenderBuffer management Allocates a set of render buffers.

Public function Virtual Const

void

 

DrawBatch

(
    FMeshElementCollector& Collector,
    const FMeshRenderBufferSet& Render...,
    const FDynamicMeshIndexBuffer32& I...,
    FMaterialRenderProxy* UseMater...,
    bool bWireframe,
    ESceneDepthPriorityGroup DepthPrior...,
    int ViewIndex,
    FDynamicPrimitiveUniformBuffer& Dy...
)

Draw a single-frame FMeshBatch for a FMeshRenderBufferSet

Public function Const

void

 

GetActiveRenderBufferSets

(
    TArray< FMeshRenderBufferSet* ...
)

FBaseDynamicMeshSceneProxy API - subclasses must implement these functions Return set of active renderbuffers.

Public function Virtual Const

UMaterialInt...

 

GetMaterial

(
    int32 k
)

Safe GetMaterial function that will never return nullptr

Public function Virtual Const

int32

 

GetNumMaterials()

Public function

void

 

InitializeBuffersFromOverlays

(
    FMeshRenderBufferSet* RenderBu...,
    const FDynamicMesh3* Mesh,
    int NumTriangles,
    TriangleEnumerable Enumerable,
    const FDynamicMeshUVOverlay* U...,
    const FDynamicMeshNormalOverlay...,
    const FDynamicMeshColorOverlay*...,
    TFunctionRef< void bTrackTriangles
)

Initialize rendering buffers from given attribute overlays.

Public function

void

 

InitializeBuffersFromOverlays

(
    FMeshRenderBufferSet* RenderBu...,
    const FDynamicMesh3* Mesh,
    int NumTriangles,
    TriangleEnumerable Enumerable,
    const TArray< const FDynamicMeshUVO...,
    const FDynamicMeshNormalOverlay...,
    const FDynamicMeshColorOverlay*...,
    TFunctionRef< void bTrackTriangles
)

Initialize rendering buffers from given attribute overlays.

Public function

void

 

RecomputeRenderBufferTriangleIndexSets

(
    FMeshRenderBufferSet* RenderBu...,
    const FDynamicMesh3* Mesh
)

RecomputeRenderBufferTriangleIndexSets re-sorts the existing set of triangles in a FMeshRenderBufferSet into primary and secondary index buffers.

Public function Virtual

void

 

ReleaseRenderBufferSet

(
    FMeshRenderBufferSet* BufferSe...
)

Explicitly release a set of RenderBuffers

Public function Virtual

void

 

UpdatedReferencedMaterials()

This needs to be called if the set of active materials changes, otherwise the check in FPrimitiveSceneProxy::VerifyUsedMaterial() will fail if an override material is set, if materials change, etc, etc

Public function

void

 

UpdateSecondaryTriangleBuffer

(
    FMeshRenderBufferSet* RenderBu...,
    const FDynamicMesh3* Mesh,
    bool bDuplicate
)

Filter the triangles in a FMeshRenderBufferSet into the SecondaryIndexBuffer.

Public function

void

 

UpdateVertexBuffersFromOverlays

(
    FMeshRenderBufferSet* RenderBu...,
    const FDynamicMesh3* Mesh,
    int NumTriangles,
    TriangleEnumerable Enumerable,
    const FDynamicMeshNormalOverlay...,
    const FDynamicMeshColorOverlay*...,
    TFunctionRef< void bUpdatePositions,
    bool bUpdateNormals,
    bool bUpdateColors
)

Update vertex positions/normals/colors of an existing set of render buffers.

Public function

void

 

UpdateVertexUVBufferFromOverlays

(
    FMeshRenderBufferSet* RenderBu...,
    const FDynamicMesh3* Mesh,
    int32 NumTriangles,
    TriangleEnumerable Enumerable,
    const TArray< const FDynamicMeshUVO...
)

Update vertex uvs of an existing set of render buffers.

Overridden from FPrimitiveSceneProxy

Name Description

Public function Virtual Const

void

 

GetDynamicMeshElements

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

FBaseDynamicMeshSceneProxy implementation Render set of active RenderBuffers returned by GetActiveRenderBufferSets

Typedefs

Name

Description

FIndex2i

FIndex3i