UGoogleARCoreFrameFunctionLibrary
#include <GoogleARCoreFunctionLibrary.h>
A function library that provides static/Blueprint functions associated with most recent GoogleARCore tracking frame.
Summary
Inheritance
Inherits from: UBlueprintFunctionLibrary
Public static functions |
|
---|---|
ARCoreLineTrace(UObject *WorldContextObject, const FVector2D & ScreenPosition, TSet< EGoogleARCoreLineTraceChannel > TraceChannels, TArray< FARTraceResult > & OutHitResults)
|
bool
Traces a ray from the user's device in the direction of the given location in the camera view.
|
ARCoreLineTraceRay(UObject *WorldContextObject, const FVector & Start, const FVector & End, TSet< EGoogleARCoreLineTraceChannel > TraceChannels, TArray< FARTraceResult > & OutHitResults)
|
bool
Traces a ray along the given line.
|
AcquireCameraImage(UGoogleARCoreCameraImage *& OutLatestCameraImage)
|
Acquire a CPU-accessible camera image.
|
AcquirePointCloud(UGoogleARCorePointCloud *& OutLatestPointCloud)
|
Acquires latest point cloud.
|
GetCameraImageIntrinsics(UGoogleARCoreCameraIntrinsics *& OutCameraIntrinsics)
|
Get the camera intrinsics for the camera image (CPU image).
|
GetCameraTexture()
|
UTexture *
Get the pass-through camera texture that GoogleARCore plugin will use to render the passthrough camera background.
|
GetCameraTextureIntrinsics(UGoogleARCoreCameraIntrinsics *& OutCameraIntrinsics)
|
Get the camera intrinsics for the camera texture (GPU image).
|
GetLightEstimation(FGoogleARCoreLightEstimate & OutLightEstimate)
|
void
Gets the latest light estimation.
|
GetPointCloud(UGoogleARCorePointCloud *& OutLatestPointCloud)
|
Gets the latest point cloud that will be only available for this frame.
|
GetPose(FTransform & OutPose)
|
void
Gets the latest tracking pose of the ARCore device in Unreal AR Tracking Space.
|
GetTrackingFailureReason()
|
Returns the reason when UARBlueprintLibrary::GetTrackingQuality() returns NotTracking, or UGoogleARCoreFrameFunctionLibrary::GetTrackingState returns Paused.
|
GetTrackingState()
|
Returns the current ARCore session status.
|
GetUpdatedARPins(TArray< UARPin * > & OutAnchorList)
|
void
Gets a list of UARPin objects that were changed in this frame.
|
GetUpdatedAugmentedFaces(TArray< UGoogleARCoreAugmentedFace * > & OutFaceList)
|
void
Gets a list of UGoogleARCoreAugmentedFace objects that were changed in this frame.
|
GetUpdatedAugmentedImages(TArray< UGoogleARCoreAugmentedImage * > & OutImageList)
|
void
Gets a list of UGoogleARCoreAugmentedImage objects that were changed in this frame.
|
GetUpdatedPlanes(TArray< UARPlaneGeometry * > & OutPlaneList)
|
void
Gets a list of UARPlaneGeometry objects that were changed in this frame.
|
GetUpdatedTrackable(TArray< T * > & OutTrackableList)
|
void
Template function to get the updated trackables in this frame a given trackable type.
|
GetUpdatedTrackablePoints(TArray< UARTrackedPoint * > & OutTrackablePointList)
|
void
Gets a list of UARTrackedPoint objects that were changed in this frame.
|
TransformARCoordinates2D(EGoogleARCoreCoordinates2DType InputCoordinatesType, const TArray< FVector2D > & InputCoordinates, EGoogleARCoreCoordinates2DType OutputCoordinatesType, TArray< FVector2D > & OutputCoordinates)
|
void
Transforms an array of 2D coordinates into a different 2D coordinate system.
|
Public static functions
ARCoreLineTrace
bool ARCoreLineTrace( UObject *WorldContextObject, const FVector2D & ScreenPosition, TSet< EGoogleARCoreLineTraceChannel > TraceChannels, TArray< FARTraceResult > & OutHitResults )
Traces a ray from the user's device in the direction of the given location in the camera view.
Intersections with detected scene geometry are returned, sorted by distance from the device; the nearest intersection is returned first.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Returns |
True if there is a hit detected.
|
ARCoreLineTraceRay
bool ARCoreLineTraceRay( UObject *WorldContextObject, const FVector & Start, const FVector & End, TSet< EGoogleARCoreLineTraceChannel > TraceChannels, TArray< FARTraceResult > & OutHitResults )
Traces a ray along the given line.
Intersections with detected scene geometry are returned, sorted by distance from the start of the line; the nearest intersection is returned first.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Returns |
True if there is a hit detected.
|
AcquireCameraImage
EGoogleARCoreFunctionStatus AcquireCameraImage( UGoogleARCoreCameraImage *& OutLatestCameraImage )
Acquire a CPU-accessible camera image.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
An EGoogleARCoreFunctionStatus. Possible value: Success, ResourceExhausted, NotAvailable.
|
AcquirePointCloud
EGoogleARCoreFunctionStatus AcquirePointCloud( UGoogleARCorePointCloud *& OutLatestPointCloud )
Acquires latest point cloud.
This will make the point cloud remain valid unless you call UGoogleARCrePointCloud::ReleasePointCloud(). Be aware that this function could fail if the maximal number of point cloud has been acquired.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
An EGoogleARCoreFunctionStatus. Possible value: Success, SessionPaused, ResourceExhausted.
|
GetCameraImageIntrinsics
EGoogleARCoreFunctionStatus GetCameraImageIntrinsics( UGoogleARCoreCameraIntrinsics *& OutCameraIntrinsics )
Get the camera intrinsics for the camera image (CPU image).
Details | |||
---|---|---|---|
Parameters |
|
GetCameraTexture
UTexture * GetCameraTexture()
Get the pass-through camera texture that GoogleARCore plugin will use to render the passthrough camera background.
Note that UTexture object this function returns may change every frame. If you want to use the camera texture, you should call the function every frame and update the texture parameter in your material.
Details | |
---|---|
Returns |
A pointer to the UTexture that will be used to render the passthrough camera background.
|
GetCameraTextureIntrinsics
EGoogleARCoreFunctionStatus GetCameraTextureIntrinsics( UGoogleARCoreCameraIntrinsics *& OutCameraIntrinsics )
Get the camera intrinsics for the camera texture (GPU image).
Details | |||
---|---|---|---|
Parameters |
|
GetLightEstimation
void GetLightEstimation( FGoogleARCoreLightEstimate & OutLightEstimate )
Gets the latest light estimation.
Details | |||
---|---|---|---|
Parameters |
|
GetPointCloud
EGoogleARCoreFunctionStatus GetPointCloud( UGoogleARCorePointCloud *& OutLatestPointCloud )
Gets the latest point cloud that will be only available for this frame.
If you want to keep the point cloud data, you can either copy it to your own struct or call AcquireLatestPointCloud() to avoid the copy.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
An EGoogleARCoreFunctionStatus. Possible value: Success, SessionPaused, ResourceExhausted.
|
GetPose
void GetPose( FTransform & OutPose )
Gets the latest tracking pose of the ARCore device in Unreal AR Tracking Space.
Note that ARCore motion tracking has already integrated with HMD and the motion controller interface. Use this function only if you need to implement your own tracking component.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
True if the pose is updated successfully for this frame.
|
GetTrackingFailureReason
EGoogleARCoreTrackingFailureReason GetTrackingFailureReason()
Returns the reason when UARBlueprintLibrary::GetTrackingQuality() returns NotTracking, or UGoogleARCoreFrameFunctionLibrary::GetTrackingState returns Paused.
In scenarios when multiple causes result in tracking failures, this reports the most actionable failure reason.
Details | |
---|---|
Returns |
A EGoogleARCoreTrackingFailureReason enum that describes the tracking failure reason.
|
GetTrackingState
EGoogleARCoreTrackingState GetTrackingState()
Returns the current ARCore session status.
Details | |
---|---|
Returns |
A EARSessionStatus enum that describes the session status.
|
GetUpdatedARPins
void GetUpdatedARPins( TArray< UARPin * > & OutAnchorList )
Gets a list of UARPin objects that were changed in this frame.
Details | |||
---|---|---|---|
Parameters |
|
GetUpdatedAugmentedFaces
void GetUpdatedAugmentedFaces( TArray< UGoogleARCoreAugmentedFace * > & OutFaceList )
Gets a list of UGoogleARCoreAugmentedFace objects that were changed in this frame.
Details | |||
---|---|---|---|
Parameters |
|
GetUpdatedAugmentedImages
void GetUpdatedAugmentedImages( TArray< UGoogleARCoreAugmentedImage * > & OutImageList )
Gets a list of UGoogleARCoreAugmentedImage objects that were changed in this frame.
Details | |||
---|---|---|---|
Parameters |
|
GetUpdatedPlanes
void GetUpdatedPlanes( TArray< UARPlaneGeometry * > & OutPlaneList )
Gets a list of UARPlaneGeometry objects that were changed in this frame.
Details | |||
---|---|---|---|
Parameters |
|
GetUpdatedTrackable
void GetUpdatedTrackable( TArray< T * > & OutTrackableList )
Template function to get the updated trackables in this frame a given trackable type.
GetUpdatedTrackablePoints
void GetUpdatedTrackablePoints( TArray< UARTrackedPoint * > & OutTrackablePointList )
Gets a list of UARTrackedPoint objects that were changed in this frame.
Details | |||
---|---|---|---|
Parameters |
|
TransformARCoordinates2D
void TransformARCoordinates2D( EGoogleARCoreCoordinates2DType InputCoordinatesType, const TArray< FVector2D > & InputCoordinates, EGoogleARCoreCoordinates2DType OutputCoordinatesType, TArray< FVector2D > & OutputCoordinates )
Transforms an array of 2D coordinates into a different 2D coordinate system.
This will account for the display rotation, and any additional required adjustment.
Some examples of useful conversions: To transform screen space UVs for texture space UVs to rendering pass-through camera texture: Viewport -> Texture; To transform a point found by a computer vision algorithm in the pass-through camera image into a point on the viewport: Image -> Viewport;
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|