UARBlueprintLibrary

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

AugmentedReality

Header

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

Include

#include "ARBlueprintLibrary.h"

Syntax

class UARBlueprintLibrary : public UBlueprintFunctionLibrary

Functions

Name Description

Public function Static

bool

 

AddManualEnvironmentCaptureProbe

(
    FVector Location,
    FVector Extent
)

Adds an environment capture probe to the ar world

Public function Static

FDelegateHan...

 

AddOnTrackableAddedDelegate_Handle

(
    const FOnTrackableAddedDelegate& D...
)

Static helpers to create the methods needed to add/remove delegates from the AR system.

Public function Static

FDelegateHan...

 

AddOnTrackableRemovedDelegate_Handle

(
    const FOnTrackableRemovedDelegate&...
)

Public function Static

FDelegateHan...

 

AddOnTrackableUpdatedDelegate_Handle

(
    const FOnTrackableUpdatedDelegate&...
)

Public function Static

UARCandidate...

 

AddRuntimeCandidateImage

(
    UARSessionConfig* SessionConfi...,
    UTexture2D* CandidateTexture,
    FString FriendlyName,
    float PhysicalWidth
)

Create an ARCandidateImage object and add it to the ARCandidateImageList of the given `UARSessionConfig_ object.

Public function Static

bool

 

AddTrackedPointWithName

(
    const FTransform& WorldTransform,
    const FString& PointName,
    bool bDeletePointsWithSameName
)

Manually add a tracked point with name and world transform.

Public function Static

void

 

CalculateAlignmentTransform

(
    const FTransform& TransformInFirst...,
    const FTransform& TransformInSecon...,
    FTransform& AlignmentTransform
)

Computes a transform that aligns two coordinate systems. Requires the transform of the same known point in each coordinate system.

Public function Static

void

 

CalculateClosestIntersection

(
    const TArray< FVector >& StartPoin...,
    const TArray< FVector >& EndPoints,
    FVector& ClosestIntersection
)

Alignment helpers.

Public function Static

void

 

ClearOnTrackableAddedDelegate_Handle

(
    FDelegateHandle& Handle
)

Public function Static

void

 

ClearOnTrackableAddedDelegates

(
    void* Object
)

Public function Static

void

 

ClearOnTrackableRemovedDelegate_Handle

(
    FDelegateHandle& Handle
)

Public function Static

void

 

ClearOnTrackableRemovedDelegates

(
    void* Object
)

Public function Static

void

 

ClearOnTrackableUpdatedDelegate_Handle

(
    FDelegateHandle& Handle
)

Public function Static

void

 

ClearOnTrackableUpdatedDelegates

(
    void* Object
)

Public function Static

void

 

DebugDrawPin

(
    UARPin* ARPin,
    UObject* WorldContextObject,
    FLinearColor Color,
    float Scale,
    float PersistForSeconds
)

Given a `UARPin_, draw it for debugging purposes.

Public function Static

void

 

DebugDrawTrackedGeometry

(
    UARTrackedGeometry* TrackedGeo...,
    UObject* WorldContextObject,
    FLinearColor Color,
    float OutlineThickness,
    float PersistForSeconds
)

Given some real-world geometry being tracked by the Augmented Reality system, draw it on the screen for debugging purposes (rudimentary)

Public function Static

TArray< UART...

 

FindTrackedPointsByName

(
    const FString& PointName
)

Public function Static

FTransform

 

GetAlignmentTransform()

Public function Static

TArray< UART...

 

GetAllGeometries()

Public function Static

TArray< T &#...

 

GetAllGeometriesByClass()

Public function Static

TArray< UART...

 

GetAllGeometriesByClass

(
    TSubclassOf< UARTrackedGeometry > G...
)

Public function Static

TArray< UARP...

 

GetAllPins()

Get a list of all the `UARPin_ objects that the Augmented Reality session is currently using to connect virtual objects to real-world, tracked locations.

Public function Static

TArray< FARP...

 

GetAllTracked2DPoses()

Public function Static

FARSessionSt...

 

GetARSessionStatus()

It is intended that you check the status of the Augmented Reality session on every frame and take action accordingly.

Public function Static

UARTexture &...

 

GetARTexture

(
    EARTextureType TextureType
)

Public function Static

float

 

GetARWorldScale()

Public function Static

bool

 

GetCameraIntrinsics

(
    FARCameraIntrinsics& OutCameraIntr...
)

Public function Static

TSharedPtr< ...

 

GetCandidateObject

(
    FVector Location,
    FVector Extent
)

Public function Static

UARLightEsti...

 

GetCurrentLightEstimate()

An AugmentedReality session can be configured to provide light estimates.

Public function Static

int32

 

GetNumberOfTrackedFacesSupported()

Public function Static

bool

 

GetObjectClassificationAtLocation

(
    const FVector& InWorldLocation,
    EARObjectClassification& OutClassi...,
    FVector& OutClassificationLocation,
    float MaxLocationDiff
)

Try to determine the classification of the object at a world space location : the world location where the classification is needed : the classification result : the world location at where the classification is calculated : the max distance between the specified world location and the classification location

Public function Static

TArray< FVec...

 

GetPointCloud()

Public function Static

UARSessionCo...

 

GetSessionConfig()

Public function Static

TArray< FARV...

 

GetSupportedVideoFormats

(
    EARSessionType SessionType
)

Public function Static

EARTrackingQ...

 

GetTrackingQuality()

Public function Static

EARTrackingQ...

 

GetTrackingQualityReason()

Public function Static

EARWorldMapp...

 

GetWorldMappingStatus()

Public function Static

bool

 

IsARPinLocalStoreReady()

Is ARPin Local Store Ready

Public function Static

bool

 

IsARPinLocalStoreSupported()

Is ARPin Local Store Supported

Public function Static

bool

 

IsARSupported()

Checks if the current device can support AR

Public function Static

bool

 

IsSceneReconstructionSupported

(
    EARSessionType SessionType,
    EARSceneReconstruction SceneReconst...
)

Public function Static

bool

 

IsSessionTrackingFeatureSupported

(
    EARSessionType SessionType,
    EARSessionTrackingFeature SessionTr...
)

Public function Static

bool

 

IsSessionTypeSupported

(
    EARSessionType SessionType
)

Test whether this type of session is supported by the current Augmented Reality platform.

Public function Static

TArray< FART...

 

LineTraceTrackedObjects

(
    const FVector2D ScreenCoord,
    bool bTestFeaturePoints,
    bool bTestGroundPlane,
    bool bTestPlaneExtents,
    bool bTestPlaneBoundaryPolygon
)

Perform a line trace against any real-world geometry as tracked by the AR system.

Public function Static

TArray< FART...

 

LineTraceTrackedObjects3D

(
    const FVector Start,
    const FVector End,
    bool bTestFeaturePoints,
    bool bTestGroundPlane,
    bool bTestPlaneExtents,
    bool bTestPlaneBoundaryPolygon
)

Perform a line trace against any real-world geometry as tracked by the AR system.

Public function Static

TMap< FName,...

 

LoadARPinsFromLocalStore()

Load all ARPins from local save

Public function Static

void

 

PauseARSession()

Pause a running Augmented Reality session without clearing existing state.

Public function Static

UARPin *

 

PinComponent

(
    USceneComponent* ComponentToPi...,
    const FTransform& PinToWorldTransf...,
    UARTrackedGeometry* TrackedGeo...,
    const FName DebugName
)

Pin an Unreal Component to a location in tracking spce (i.e. the real world).

Public function Static

bool

 

PinComponentToARPin

(
    USceneComponent* ComponentToPi...,
    UARPin* Pin
)

Associate a component with an ARPin, so that its transform will be updated by the pin.

Public function Static

UARPin *

 

PinComponentToTraceResult

(
    USceneComponent* ComponentToPi...,
    const FARTraceResult& TraceResult,
    const FName DebugName
)

A convenient version of [PinComponent()](API\Runtime\AugmentedReality\UARBlueprintLibrary\PinComponent)_ that can be used in conjunction with a result of a LineTraceTrackedObjects_ call.

Public function Static

void

 

RegisterAsARSystem

(
    const TSharedRef< FARSupportInterfa...
)

Public function Static

void

 

RemoveAllARPinsFromLocalStore()

Remove all ARPins from the local store

Public function Static

void

 

RemoveARPinFromLocalStore

(
    FName InSaveName
)

Remove an ARPin from the local store

Public function Static

void

 

RemovePin

(
    UARPin* PinToRemove
)

Remove a pin such that it no longer updates the associated component.

Public function Static

FIntPoint

 

ResizeXRCamera

(
    const FIntPoint& InSize
)

Change screen size of Mixed Reality Capture camera.

Public function Static

bool

 

SaveARPinToLocalStore

(
    FName InSaveName,
    UARPin* InPin
)

Save an ARPin to local store

Public function Static

TSharedPtr< ...

 

SaveWorld()

Public function Static

void

 

SetAlignmentTransform

(
    const FTransform& InAlignmentTrans...
)

Set a transform that will be applied to the tracking space.

Public function Static

void

 

SetARWorldOriginLocationAndRotation

(
    FVector OriginLocation,
    FRotator OriginRotation,
    bool bIsTransformInWorldSpace,
    bool bMaintainUpDirection
)

For a point P in the AR local space, whose location and rotation are "OriginLocation" and "OriginRotation" in the world space modify the alignment transform so that the same point P will be transformed to the origin in the world space.

Public function Static

void

 

SetARWorldScale

(
    float InWorldScale
)

Helper function that modifies the alignment transform scale so that virtual content in the world space appears to be "scaled".

Public function Static

void

 

SetEnabledXRCamera

(
    bool bOnOff
)

Enable or disable Mixed Reality Capture camera.

Public function Static

void

 

StartARSession

(
    UARSessionConfig* SessionConfi...
)

Begin a new Augmented Reality session.

Public function Static

void

 

StopARSession()

Stop a running Augmented Reality session and clear any state.

Public function Static

bool

 

ToggleARCapture

(
    const bool bOnOff,
    const EARCaptureType CaptureType
)

Starts or stops a battery intensive service on device.

Public function Static

void

 

UnpinComponent

(
    USceneComponent* ComponentToUn...
)

Given a pinned `ComponentToUnpin_, remove its attachment to the real world.

Constants

Name

Description

RegisteredARSystem

Deprecated Functions

Name Description

Public function Static

TArray< UARE...

 

GetAllTrackedEnvironmentCaptureProbes()

GetAllTrackedEnvironmentCaptureProbes is deprecated, use GetAllGeometriesByClass.

Public function Static

TArray< UART...

 

GetAllTrackedImages()

GetAllTrackedImages is deprecated, use GetAllGeometriesByClass.

Public function Static

TArray< UARP...

 

GetAllTrackedPlanes()

GetAllTrackedPlanes is deprecated, use GetAllGeometriesByClass.

Public function Static

TArray< UART...

 

GetAllTrackedPoints()

GetAllTrackedPoints is deprecated, use GetAllGeometriesByClass.

Public function Static

TArray< UART...

 

GetAllTrackedPoses()

GetAllTrackedPoses is deprecated, use GetAllGeometriesByClass.

Public function Static

UARTextureCa...

 

GetCameraDepth()

GetCameraDepth is deprecated, use GetARTexture.

Public function Static

UARTextureCa...

 

GetCameraImage()

GetCameraImage is deprecated, use GetARTexture.

Public function Static

UARTexture &...

 

GetPersonSegmentationDepthImage()

GetPersonSegmentationDepthImage is deprecated, use GetARTexture.

Public function Static

UARTexture &...

 

GetPersonSegmentationImage()

GetPersonSegmentationImage is deprecated, use GetARTexture.