UARComponent

ARComponent handles replication and visualization update for AR tracked geometries ARComponent is created in either multiplayer or local only environment

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AugmentedReality

Header

/Engine/Source/Runtime/AugmentedReality/Public/ARComponent.h

Include

#include "ARComponent.h"

Syntax

class UARComponent : public USceneComponent

Remarks

ARComponent handles replication and visualization update for AR tracked geometries ARComponent is created in either multiplayer or local only environment

To customize the visualization logic, override 'UpdateVisualization' in Blueprint or 'UpdateVisualization_Implementation' in C++

To customize the replication logic, disable 'bUseDefaultReplication' and implement your own replication logic when the ARComponent is updated (see how 'Update' is implemented in the sub classes)

A MRMeshComponent will be created if mesh visualization is enabled (see UARSessionConfig::bGenerateMeshDataFromTrackedGeometry) It can be accessed via 'GetMRMesh' or 'UARTrackedGeometry::GetUnderlyingMesh'

Variables

Name Description

Protected variable

bool

 

bFirstUpdate

If this component has ever been updated

Protected variable

bool

 

bInDebugMode

Protected variable

bool

 

bIsRemoved

If 'ReceiveRemove' has been called for this component

Protected variable

bool

 

bSavedWireframeMode

Protected variable

bool

 

bUseDefaultReplication

If the default replication logic should be used for this component

Protected variable

UMaterialInterf...

 

DefaultMeshMaterial

The default material to be used for the generated mesh component.

Protected variable

UMaterialInterf...

 

DefaultWireframeMeshMaterial

The default wireframe material to be used for the generated mesh component.

Protected variable

UMRMeshComponen...

 

MRMeshComponent

Protected variable

UARTrackedGeome...

 

MyTrackedGeometry

The tracked geometry used for updating this component, only set on "local" client

Public variable

FGuid

 

NativeID

Public variable

FMRMeshDelegate

 

OnMRMeshCreated

Public variable

FMRMeshDelegate

 

OnMRMeshDestroyed

Protected variable

FLinearColor

 

SavedWireframeColor

Constructors

Name Description

Public function

UARComponent()

Functions

Name Description

Protected function Const

FLinearColor

 

GetDebugColor()

Public function

UMRMeshCompo...

 

GetMRMesh()

Protected function

void

 

ManageMeshComponentForDebugMode

(
    bool bDebugModeEnabled,
    const FARSessionPayload& SessionPa...
)

Protected function Virtual

void

 

OnRep_Payload()

Public function

void

 

ReceiveRemove()

Event when native representation is removed, called on server and clients.

Public function Virtual

void

 

Remove

(
    UARTrackedGeometry* TrackedGeo...
)

Protected function

void

 

RemoveMeshComponent

(
    UARTrackedGeometry* TrackedGeo...
)

Public function

void

 

SetNativeID

(
    FGuid NativeID
)

Public function Virtual

void

 

Update

(
    UARTrackedGeometry* TrackedGeo...
)

Public function

void

 

UpdateVisualization()

Overridden from UActorComponent

Name Description

Protected function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Typedefs

Name

Description

FMRMeshDelegate

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