UGoogleARCoreSessionFunctionLibrary

#include <GoogleARCoreFunctionLibrary.h>

A function library that provides static/Blueprint functions associated with GoogleARCore session.

Summary

Inheritance

Inherits from: UBlueprintFunctionLibrary

Public static functions

CheckARCoreAvailability(UObject *WorldContextObject, struct FLatentActionInfo LatentInfo, EGoogleARCoreAvailability & OutAvailability)
void
A Latent Action to check the availability of ARCore on this device.
CheckARCoreAvailableStatus()
EGoogleARCoreAvailability
A polling function to check the ARCore availability in C++.
GetARCoreAPKInstallResult()
EGoogleARCoreInstallRequestResult
A polling function to check the ARCore install request result in C++.
GetARCoreCameraConfig(FGoogleARCoreCameraConfig & OutCurrentCameraConfig)
bool
Get the FGoogleARCoreCameraConfig that the current ARCore session is using.
GetARCoreEventManager()
Get the UGoogleARCoreEventManager to bind BP events or c++ delegate in GoogleARCore plugins.
GetAllPlanes(TArray< UARPlaneGeometry * > & OutPlaneList)
void
Gets a list of all valid UARPlaneGeometry objects that ARCore is currently tracking.
GetAllTrackable(TArray< T * > & OutTrackableList)
void
Template function to get all trackables from a given type.
GetAllTrackablePoints(TArray< UARTrackedPoint * > & OutTrackablePointList)
void
Gets a list of all valid UARTrackedPoint objects that ARCore is currently tracking.
GetPassthroughCameraImageUV(const TArray< float > & InUV, TArray< float > & OutUV)
void
Gets the texture coordinate information about the passthrough camera texture.
InstallARCoreService(UObject *WorldContextObject, struct FLatentActionInfo LatentInfo, EGoogleARCoreInstallRequestResult & OutInstallResult)
void
A Latent Action to initiates installation of ARCore if required.
IsPassthroughCameraRenderingEnabled()
bool
Returns the state of the passthrough camera rendering in GoogleARCore ARSystem.
RequestInstallARCoreAPK()
EGoogleARCoreInstallStatus
Initiates installation of ARCore if required.
SetARCoreCameraConfig(FGoogleARCoreCameraConfig TargetCameraConfig)
bool
Configure the ARCoreSession with the desired camera configuration.
SetPassthroughCameraRenderingEnabled(bool bEnable)
void
Enables/Disables the passthrough camera rendering in GoogleARCore ARSystem.
StartARCoreSession(UObject *WorldContextObject, struct FLatentActionInfo LatentInfo, UGoogleARCoreSessionConfig *Configuration)
void
Starts a new ARCore tracking session GoogleARCore specific configuration.

Public static functions

CheckARCoreAvailability

void CheckARCoreAvailability(
  UObject *WorldContextObject,
  struct FLatentActionInfo LatentInfo,
  EGoogleARCoreAvailability & OutAvailability
)

A Latent Action to check the availability of ARCore on this device.

This may initiate a query with a remote service to determine if the device is supported by ARCore. The Latent Action will complete when the check is finished.

Details
Parameters
OutAvailability
The availability result as a EGoogleARCoreAvailability.

CheckARCoreAvailableStatus

EGoogleARCoreAvailability CheckARCoreAvailableStatus()

A polling function to check the ARCore availability in C++.

This may initiate a query with a remote service to determine if the device is supported by ARCore, so this function will EGoogleARCoreAvailability::UnknownChecking.

Details
Returns
The availability result as a EGoogleARCoreAvailability.

GetARCoreAPKInstallResult

EGoogleARCoreInstallRequestResult GetARCoreAPKInstallResult()

A polling function to check the ARCore install request result in C++.

After you call RequestInstallARCoreAPK() and it returns EGoogleARCoreInstallStatus::Requrested. You can call this function to check the install requst result.

Details
Returns
The install request result as a EGoogleARCoreInstallRequestResult.

GetARCoreCameraConfig

bool GetARCoreCameraConfig(
  FGoogleARCoreCameraConfig & OutCurrentCameraConfig
)

Get the FGoogleARCoreCameraConfig that the current ARCore session is using.

Details
Parameters
OutCurrentCameraConfig
The FGoogleARCoreCameraConfig that the current ARCore session is using.
Returns
True if there is a valid ARCore session and the current camera config is returned. False if ARCore session hasn't been started or it is already stopped.

GetARCoreEventManager

UGoogleARCoreEventManager * GetARCoreEventManager()

Get the UGoogleARCoreEventManager to bind BP events or c++ delegate in GoogleARCore plugins.

GetAllPlanes

void GetAllPlanes(
  TArray< UARPlaneGeometry * > & OutPlaneList
)

Gets a list of all valid UARPlaneGeometry objects that ARCore is currently tracking.

Planes that have entered the EARTrackingState::StoppedTracking state or for which UARPlaneGeometry::GetSubsumedBy returns non-null will not be included.

Details
Parameters
OutAnchorList
An array that contains all the valid planes detected by ARCore.

GetAllTrackable

void GetAllTrackable(
  TArray< T * > & OutTrackableList
)

Template function to get all trackables from a given type.

GetAllTrackablePoints

void GetAllTrackablePoints(
  TArray< UARTrackedPoint * > & OutTrackablePointList
)

Gets a list of all valid UARTrackedPoint objects that ARCore is currently tracking.

TrackablePoint that have entered the EARTrackingState::StoppedTracking state will not be included.

Details
Parameters
OutAnchorList
An array that contains all the valid planes detected by ARCore.

GetPassthroughCameraImageUV

void GetPassthroughCameraImageUV(
  const TArray< float > & InUV,
  TArray< float > & OutUV
)

Gets the texture coordinate information about the passthrough camera texture.

Details
Parameters
InUV
The original UVs of on the quad. Should be an array with 8 floats.
OutUV
The orientated UVs that can be used to sample the passthrough camera texture and make sure it is displayed correctly.

InstallARCoreService

void InstallARCoreService(
  UObject *WorldContextObject,
  struct FLatentActionInfo LatentInfo,
  EGoogleARCoreInstallRequestResult & OutInstallResult
)

A Latent Action to initiates installation of ARCore if required.

This function may cause your application be paused if installing ARCore is required.

Details
Parameters
OutInstallResult
The install request result as a EGoogleARCoreInstallRequestResult.

IsPassthroughCameraRenderingEnabled

bool IsPassthroughCameraRenderingEnabled()

Returns the state of the passthrough camera rendering in GoogleARCore ARSystem.

Details
Returns
True if the passthrough camera rendering is enabled.

RequestInstallARCoreAPK

EGoogleARCoreInstallStatus RequestInstallARCoreAPK()

Initiates installation of ARCore if required.

This function will return immediately and may pause your application if installing ARCore is required.

Details
Returns
EGoogleARCoreInstallStatus::Requrested if it started a install request.

SetARCoreCameraConfig

bool SetARCoreCameraConfig(
  FGoogleARCoreCameraConfig TargetCameraConfig
)

Configure the ARCoreSession with the desired camera configuration.

The TargetCameraConfig must be from a list returned by UGoogleARCoreEventManager::OnCameraConfig delegate.

This function should be called when UGoogleARCoreEventManager::OnCameraConfig delegate got triggered.

SetPassthroughCameraRenderingEnabled

void SetPassthroughCameraRenderingEnabled(
  bool bEnable
)

Enables/Disables the passthrough camera rendering in GoogleARCore ARSystem.

Note that when passthrough camera rendering is enabled, the camera FOV will be forced to match FOV of the physical camera on the device.

StartARCoreSession

void StartARCoreSession(
  UObject *WorldContextObject,
  struct FLatentActionInfo LatentInfo,
  UGoogleARCoreSessionConfig *Configuration
)

Starts a new ARCore tracking session GoogleARCore specific configuration.

If the session already started and the config isn't the same, it will stop the previous session and start a new session with the new config. Note that this is a latent action, you can query the session start result by querying GetARCoreSessionStatus() after the latent action finished.

Details
Parameters
Configuration
The ARCoreSession configuration to start the session.

Send feedback about...