UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UMockDataMeshTrackerComponent Class Reference

#include <MockDataMeshTrackerComponent.h>

+ Inheritance diagram for UMockDataMeshTrackerComponent:

Public Member Functions

MRMESH_API ~UMockDataMeshTrackerComponent ()
 
MRMESH_API void ConnectMRMesh (class UMRMeshComponent *InMRMeshPtr)
 
MRMESH_API void DisconnectMRMesh (class UMRMeshComponent *InMRMeshPtr)
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_FiveParams (FOnMockDataMeshTrackerUpdated, int32, Index, const TArray< FVector > &, Vertices, const TArray< int32 > &, Triangles, const TArray< FVector > &, Normals, const TArray< float > &, Confidence)
 
virtual MRMESH_API void TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 
virtual MRMESH_API void BeginDestroy () override
 
virtual MRMESH_API void FinishDestroy () override
 

Public Attributes

FOnMockDataMeshTrackerUpdated OnMeshTrackerUpdated
 
bool ScanWorld = true
 
bool RequestNormals = true
 
bool RequestVertexConfidence = false
 
EMeshTrackerVertexColorMode VertexColorMode = EMeshTrackerVertexColorMode::None
 
TArray< FColorBlockVertexColors
 
FLinearColor VertexColorFromConfidenceZero
 
FLinearColor VertexColorFromConfidenceOne
 
float UpdateInterval = 3.0f
 
TObjectPtr< class UMRMeshComponent > MRMesh
 

Detailed Description

The MeshTrackerComponent class manages requests for environmental mesh data, processes the results and provides them to the calling system. The calling system is able request environmental mesh data within a specified area. Various other search criteria can be set via this class's public properties. Mesh data requests are processed on a separate thread. Once a mesh data request has been processed the calling system will be notified via an FOnMeshTrackerUpdated broadcast.

Constructor & Destructor Documentation

◆ ~UMockDataMeshTrackerComponent()

UMockDataMeshTrackerComponent::~UMockDataMeshTrackerComponent ( )

Destroys the FMeshTrackerImpl instance.

Member Function Documentation

◆ BeginDestroy()

void UMockDataMeshTrackerComponent::BeginDestroy ( )
overridevirtual

Unlinks the current procedural mesh component from the mesh tracking system.

◆ ConnectMRMesh()

void UMockDataMeshTrackerComponent::ConnectMRMesh ( class UMRMeshComponent *  InMRMeshPtr)

Sets the procedural mesh component that will store and display the environmental mesh results.

Parameters
InMRMeshPtrThe procedural mesh component to store the query result in.

◆ DECLARE_DYNAMIC_MULTICAST_DELEGATE_FiveParams()

UMockDataMeshTrackerComponent::DECLARE_DYNAMIC_MULTICAST_DELEGATE_FiveParams ( FOnMockDataMeshTrackerUpdated  ,
int32  ,
Index  ,
const TArray< FVector > &  ,
Vertices  ,
const TArray< int32 > &  ,
Triangles  ,
const TArray< FVector > &  ,
Normals  ,
const TArray< float > &  ,
Confidence   
)

Delegate used by OnMeshUpdated().

Parameters
IndexThe index of the mesh section in the ProceduralMeshComponent that was updated.
VerticesList of all vertices in the updated mesh section.
TrianglesList of all triangles in the updated mesh section.
NormalsList of the normals of all triangles in the updated mesh section.
ConfidenceList of the confidence values per vertex in the updated mesh section. This can be used to determine if the user needs to scan more.

◆ DisconnectMRMesh()

void UMockDataMeshTrackerComponent::DisconnectMRMesh ( class UMRMeshComponent *  InMRMeshPtr)

Unlinks the current procedural mesh component from the mesh tracking system.

Parameters
InMRMeshPtrThe procedural mesh component to unlink from the mesh tracking system.

◆ FinishDestroy()

void UMockDataMeshTrackerComponent::FinishDestroy ( )
overridevirtual

Destroys the interface object to the mesh tracking api

◆ TickComponent()

void UMockDataMeshTrackerComponent::TickComponent ( float  DeltaTime,
enum ELevelTick  TickType,
FActorComponentTickFunction ThisTickFunction 
)
overridevirtual

The procedural mesh generated should bake physics and update its collision data. TODO: Can we calculate this based on the collision flags of the UProceduralMeshComponent? It seems like those are not being respected directly by the component. Polls for and handles the results of the environmental mesh queries.

Member Data Documentation

◆ BlockVertexColors

TArray<FColor> UMockDataMeshTrackerComponent::BlockVertexColors

Colors through which we cycle when setting vertex color by block.

◆ MRMesh

TObjectPtr<class UMRMeshComponent> UMockDataMeshTrackerComponent::MRMesh

MRMeshComponent can render and provide collision based on the Mesh data.

◆ OnMeshTrackerUpdated

FOnMockDataMeshTrackerUpdated UMockDataMeshTrackerComponent::OnMeshTrackerUpdated

Activated whenever new information about this mesh tracker is detected.

◆ RequestNormals

bool UMockDataMeshTrackerComponent::RequestNormals = true

If true, the system will generate normals for the triangle vertices.

◆ RequestVertexConfidence

bool UMockDataMeshTrackerComponent::RequestVertexConfidence = false

If true, the system will generate the mesh confidence values for the triangle vertices. These confidence values can be used to determine if the user needs to scan more.

◆ ScanWorld

bool UMockDataMeshTrackerComponent::ScanWorld = true

Set to true to start scanning the world for meshes.

◆ UpdateInterval

float UMockDataMeshTrackerComponent::UpdateInterval = 3.0f

Update Interval in Seconds.

◆ VertexColorFromConfidenceOne

FLinearColor UMockDataMeshTrackerComponent::VertexColorFromConfidenceOne

Color mapped to confidence value of one.

◆ VertexColorFromConfidenceZero

FLinearColor UMockDataMeshTrackerComponent::VertexColorFromConfidenceZero

Color mapped to confidence value of zero.

◆ VertexColorMode

EMeshTrackerVertexColorMode UMockDataMeshTrackerComponent::VertexColorMode = EMeshTrackerVertexColorMode::None

Vertex Colors can be unused, or filled with several types of information.


The documentation for this class was generated from the following files: