Navigation
API > API/Runtime > API/Runtime/AugmentedReality
Implement IARSystemSupport for any platform that wants to be an Unreal Augmented Reality System. e.g. AppleARKit, GoogleARCore. This interface is included as part of the abstract class `FARSupportInterface_ . The functions you must override are coalesced here for clarity.Augmented Reality Spaces
Engineers working on supporting Augmented Reality must be aware of three spaces:
TrackingSpace : This is the space defined by the underlying AR system (e.g. ARKit, ARCore, etc.) Unreal has no control over the origin of this space.
AlignedTrackingSpace : To regain control of TrackingSpace, Unreal applies the AlignmentTransform so bend TrackingSpace to its will. If you are implementing IARSystemSupport, you will need to understand this transform and apply it accordingly.
WorldSpace : This is Unreal's coordinate system. Coordinates from Tracking Space can be translated into WorldSpace by using the AlignmentTransform and the TrackingToWorldTransform.
* [TrackingSpace]--(AlignmentTransform)-->[AlignedTrackingSpace]--(TrackingToWorld)-->[WorldSpace] *
| Name | IARSystemSupport |
| Type | class |
| Header File | /Engine/Source/Runtime/AugmentedReality/Public/ARSystem.h |
| Include Path | #include "ARSystem.h" |
Syntax
class IARSystemSupport
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IARSystemSupport() |
ARSystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnTrackableAddedDelegates | FOnTrackableAdded | Delegate called when an ar item is added to the scene | ARSystem.h | |
| OnTrackableRemovedDelegates | FOnTrackableRemoved | Delegate called when an ar item is removed from the scene | ARSystem.h | |
| OnTrackableUpdatedDelegates | FOnTrackableUpdated | Delegate called when an ar item is updated | ARSystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FDelegateHandle AddOnTrackableAddedDelegate_Handle
(
const FOnTrackableAddedDelegate& Delegate |
ARSystem.h | ||
virtual FDelegateHandle AddOnTrackableRemovedDelegate_Handle
(
const FOnTrackableRemovedDelegate& Delegate |
ARSystem.h | ||
virtual FDelegateHandle AddOnTrackableUpdatedDelegate_Handle
(
const FOnTrackableUpdatedDelegate& Delegate |
ARSystem.h | ||
virtual bool ArePinsReadyToLoad() |
ARSystem.h | ||
virtual void ClearOnTrackableAddedDelegate_Handle
(
FDelegateHandle& Handle |
ARSystem.h | ||
virtual void ClearOnTrackableAddedDelegates
(
FDelegateUserObject Object |
ARSystem.h | ||
virtual void ClearOnTrackableRemovedDelegate_Handle
(
FDelegateHandle& Handle |
ARSystem.h | ||
virtual void ClearOnTrackableRemovedDelegates
(
FDelegateUserObject Object |
ARSystem.h | ||
virtual void ClearOnTrackableUpdatedDelegate_Handle
(
FDelegateHandle& Handle |
ARSystem.h | ||
virtual void ClearOnTrackableUpdatedDelegates
(
FDelegateUserObject Object |
ARSystem.h | ||
UARPin * FindARPinByComponent
(
const USceneComponent* Component |
Given a scene component find the ARPin which it is pinned by, if any. | ARSystem.h | |
void * GetARSessionRawPointer() |
ARSystem.h | ||
void * GetGameThreadARFrameRawPointer() |
ARSystem.h | ||
bool IsARAvailable() |
Returns true/false based on whether AR features are available | ARSystem.h | |
virtual bool IsLocalPinSaveSupported () |
ARPin Local Store support. | ARSystem.h | |
virtual void LoadARPins
(
TMap< FName, UARPin* >& LoadedPins |
ARSystem.h | ||
bool OnAddManualEnvironmentCaptureProbe
(
FVector Location, |
Tells the ARSystem to generate a capture probe at the specified location if supported | ARSystem.h | |
bool OnAddRuntimeCandidateImage
(
UARSessionConfig* SessionConfig, |
Add candidate image at runtime | ARSystem.h | |
virtual bool OnAddTrackedPointWithName
(
const FTransform& WorldTransform, |
ARSystem.h | ||
virtual void OnARSystemInitialized() |
Invoked after the base AR system has been initialized. | ARSystem.h | |
TArray< UARPin * > OnGetAllPins() |
ARSystem.h | ||
TArray< UARTrackedGeometry * > OnGetAllTrackedGeometries() |
ARSystem.h | ||
FARSessionStatus OnGetARSessionStatus() |
ARSystem.h | ||
virtual UARTexture * OnGetARTexture
(
EARTextureType TextureType |
ARSystem.h | ||
virtual bool OnGetCameraIntrinsics
(
FARCameraIntrinsics& OutCameraIntrinsics |
ARSystem.h | ||
TSharedPtr< FARGetCandidateObjectAsyncTask, ESPMode::ThreadSafe > OnGetCandidateObject
(
FVector Location, |
Generates a UARCandidateObject from the point cloud data within the location and its extent using an async task | ARSystem.h | |
UARLightEstimate * OnGetCurrentLightEstimate() |
ARSystem.h | ||
virtual int32 OnGetNumberOfTrackedFacesSupported() |
ARSystem.h | ||
TArray< FVector > OnGetPointCloud() |
ARSystem.h | ||
TArray< FARVideoFormat > OnGetSupportedVideoFormats
(
EARSessionType SessionType |
ARSystem.h | ||
virtual TArray< FARPose2D > OnGetTracked2DPose() |
ARSystem.h | ||
EARTrackingQuality OnGetTrackingQuality() |
ARSystem.h | ||
EARTrackingQualityReason OnGetTrackingQualityReason() |
ARSystem.h | ||
EARWorldMappingState OnGetWorldMappingStatus() |
ARSystem.h | ||
virtual bool OnIsSceneReconstructionSupported
(
EARSessionType SessionType, |
ARSystem.h | ||
virtual bool OnIsSessionTrackingFeatureSupported
(
EARSessionType SessionType, |
ARSystem.h | ||
bool OnIsTrackingTypeSupported
(
EARSessionType SessionType |
ARSystem.h | ||
TArray< FARTraceResult > OnLineTraceTrackedObjects
(
const FVector2D ScreenCoord, |
Trace all the tracked geometries and determine which have been hit by a ray cast from `ScreenCoord_. | ARSystem.h | |
TArray< FARTraceResult > OnLineTraceTrackedObjects
(
const FVector Start, |
ARSystem.h | ||
void OnPauseARSession() |
Stop the AR system but leave its internal state intact. | ARSystem.h | |
UARPin * OnPinComponent
(
USceneComponent* ComponentToPin, |
Pin an Unreal Component to a location in the world. | ARSystem.h | |
bool OnPinComponentToARPin
(
USceneComponent* ComponentToPin, |
Pin a component to an existing ARPin. | ARSystem.h | |
void OnRemovePin
(
UARPin* PinToRemove |
Given a pin, remove it and stop updating the associated component based on the tracked geometry. | ARSystem.h | |
virtual FIntPoint OnResizeXRCamera
(
const FIntPoint& InSize |
ARSystem.h | ||
TSharedPtr< FARSaveWorldAsyncTask, ESPMode::ThreadSafe > OnSaveWorld() |
Saves the AR world to a byte array using an async task | ARSystem.h | |
void OnSetAlignmentTransform
(
const FTransform& InAlignmentTransform |
Set a transform that will align the Tracking Space origin to the World Space origin. | ARSystem.h | |
virtual void OnSetEnabledXRCamera
(
bool bOnOff |
ARSystem.h | ||
virtual bool OnStartARGameFrame
(
FWorldContext& WorldContext |
ARSystem.h | ||
void OnStartARSession
(
UARSessionConfig* SessionConfig |
Start the AR system. | ARSystem.h | |
void OnStopARSession() |
Stop the AR system and reset its internal state; this task must succeed. | ARSystem.h | |
virtual bool OnToggleARCapture
(
const bool bOnOff, |
ARSystem.h | ||
virtual bool OnTryGetOrCreatePinForNativeResource
(
void* InNativeResource, |
Given the platform specific native resource for a pin, create a pin. | ARSystem.h | |
virtual void RemoveAllSavedARPins() |
ARSystem.h | ||
virtual void RemoveSavedARPin
(
FName InName |
ARSystem.h | ||
virtual bool SaveARPin
(
FName InName, |
ARSystem.h | ||
virtual void TriggerOnTrackableAddedDelegates
(
UARTrackedGeometry* Param1 |
ARSystem.h | ||
virtual void TriggerOnTrackableRemovedDelegates
(
UARTrackedGeometry* Param1 |
ARSystem.h | ||
virtual void TriggerOnTrackableUpdatedDelegates
(
UARTrackedGeometry* Param1 |
ARSystem.h |