unreal.GoogleARCoreFrameFunctionLibrary

class unreal.GoogleARCoreFrameFunctionLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

A function library that provides static/Blueprint functions associated with most recent GoogleARCore tracking frame.

C++ Source:

  • Plugin: GoogleARCore
  • Module: GoogleARCoreBase
  • File: GoogleARCoreFunctionLibrary.h
classmethod acquire_camera_image() -> (GoogleARCoreFunctionStatus, out_latest_camera_image=GoogleARCoreCameraImage)

Acquire a CPU-accessible camera image.

Returns:An EGoogleARCoreFunctionStatus. Possible value: Success, ResourceExhausted, NotAvailable.

out_latest_camera_image (GoogleARCoreCameraImage): A place to store the pointer to a new UGoogleARCoreCameraImage instance.

Return type:GoogleARCoreCameraImage
classmethod acquire_point_cloud() -> (GoogleARCoreFunctionStatus, out_latest_point_cloud=GoogleARCorePointCloud)

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.

Returns:An EGoogleARCoreFunctionStatus. Possible value: Success, SessionPaused, ResourceExhausted.

out_latest_point_cloud (GoogleARCorePointCloud): A pointer point to the latest point cloud.

Return type:GoogleARCorePointCloud
classmethod ar_core_line_trace(world_context_object, screen_position, trace_channels) → Array(ARTraceResult) or None

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.

Parameters:
  • world_context_object (Object) – The world context.
  • screen_position (Vector2D) – The position on the screen to cast the ray from.
  • trace_channels (Set(GoogleARCoreLineTraceChannel)) – A set of EGoogleARCoreLineTraceChannel indicate which type of line trace it should perform.
Returns:

True if there is a hit detected.

out_hit_results (Array(ARTraceResult)): The list of hit results sorted by distance.

Return type:

Array(ARTraceResult) or None

classmethod ar_core_line_trace_ray(world_context_object, start, end, trace_channels) → Array(ARTraceResult) or None

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.

Parameters:
  • world_context_object (Object) – The world context.
  • start (Vector) – The start of line segment.
  • end (Vector) – The end of line segment.
  • trace_channels (Set(GoogleARCoreLineTraceChannel)) – A set of EGoogleARCoreLineTraceChannel indicate which type of line trace it should perform.
Returns:

True if there is a hit detected.

out_hit_results (Array(ARTraceResult)): The list of hit results sorted by distance.

Return type:

Array(ARTraceResult) or None

classmethod get_camera_image_intrinsics() -> (GoogleARCoreFunctionStatus, out_camera_intrinsics=GoogleARCoreCameraIntrinsics)

Get the camera intrinsics for the camera image (CPU image).

Returns:out_camera_intrinsics (GoogleARCoreCameraIntrinsics): The output intrinsics object.
Return type:GoogleARCoreCameraIntrinsics
classmethod get_camera_texture() → Texture

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.

Returns:A pointer to the UTexture that will be used to render the passthrough camera background.
Return type:Texture
classmethod get_camera_texture_intrinsics() -> (GoogleARCoreFunctionStatus, out_camera_intrinsics=GoogleARCoreCameraIntrinsics)

Get the camera intrinsics for the camera texture (GPU image).

Returns:out_camera_intrinsics (GoogleARCoreCameraIntrinsics): The output intrinsics object.
Return type:GoogleARCoreCameraIntrinsics
classmethod get_light_estimation() → GoogleARCoreLightEstimate

Gets the latest light estimation.

Returns:out_light_estimate (GoogleARCoreLightEstimate): The struct that describes the latest light estimation.
Return type:GoogleARCoreLightEstimate
classmethod get_point_cloud() -> (GoogleARCoreFunctionStatus, out_latest_point_cloud=GoogleARCorePointCloud)

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.

Returns:An EGoogleARCoreFunctionStatus. Possible value: Success, SessionPaused, ResourceExhausted.

out_latest_point_cloud (GoogleARCorePointCloud): A pointer point to the latest point cloud.

Return type:GoogleARCorePointCloud
classmethod get_pose() → Transform

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.

Returns:True if the pose is updated successfully for this frame.

out_pose (Transform): The latest device pose.

Return type:Transform
classmethod get_tracking_state() → GoogleARCoreTrackingState

Returns the current ARCore session status.

Returns:A EARSessionStatus enum that describes the session status.
Return type:GoogleARCoreTrackingState
classmethod get_updated_ar_pins() -> Array(ARPin)

Gets a list of UARPin objects that were changed in this frame.

Returns:out_anchor_list (Array(ARPin)): An array that contains the updated UARPin.
Return type:Array(ARPin)
classmethod get_updated_planes() -> Array(ARPlaneGeometry)

Gets a list of UARPlaneGeometry objects that were changed in this frame.

Returns:out_plane_list (Array(ARPlaneGeometry)): An array that contains the updated UARPlaneGeometry.
Return type:Array(ARPlaneGeometry)
classmethod get_updated_trackable_points() -> Array(ARTrackedPoint)

Gets a list of UARTrackedPoint objects that were changed in this frame.

Returns:out_trackable_point_list (Array(ARTrackedPoint)): An array that contains the updated UARTrackedPoint.
Return type:Array(ARTrackedPoint)