What happened to cp_drawable_get_ar_pose(), and what is its replacement?

I see that visionOS beta 3 removed the functions cp_drawable_get_ar_pose() and ar_pose_get_origin_from_device_transform() from CompositorServices and ARKit respectively, that were in the previous betas. Why were they removed? and what are their replacement functions, if any?

Answered by atbf in 764185022

I can't speak to CompositorServices, but ARPose seems to have been eradicated from ARKit completely. I'm using the Swift API, but the equivalent C API replacements would be:

ar_world_tracking_provider_query_pose_at_timestamp -> ar_world_tracking_provider_query_device_anchor_at_timestamp

and with ar_device_anchor being a subclass of ar_trackable_anchor being a subclass of ar_anchor

ar_pose_get_origin_from_device_transform -> ar_anchor_get_origin_from_anchor_transform

Accepted Answer

I can't speak to CompositorServices, but ARPose seems to have been eradicated from ARKit completely. I'm using the Swift API, but the equivalent C API replacements would be:

ar_world_tracking_provider_query_pose_at_timestamp -> ar_world_tracking_provider_query_device_anchor_at_timestamp

and with ar_device_anchor being a subclass of ar_trackable_anchor being a subclass of ar_anchor

ar_pose_get_origin_from_device_transform -> ar_anchor_get_origin_from_anchor_transform

If you arrived here from warrenm sample code: metal-by-example/metal-spatial-rendering

Here's an updated fork with the above mentioned changes: https://github.com/Verlet/metal-spatial-rendering/

What happened to cp_drawable_get_ar_pose(), and what is its replacement?
 
 
Q