···130130struct oxr_face_tracker2_fb;
131131struct oxr_body_tracker_fb;
132132struct oxr_xdev_list;
133133+struct oxr_plane_detector_ext;
133134134135#define XRT_MAX_HANDLE_CHILDREN 256
135136#define OXR_MAX_BINDINGS_PER_ACTION 32
···380381{
381382 return XRT_CAST_PTR_TO_OXR_HANDLE(XrHandTrackerEXT, hand_tracker);
382383}
384384+385385+#ifdef OXR_HAVE_EXT_plane_detection
386386+/*!
387387+ * To go back to a OpenXR object.
388388+ *
389389+ * @relates oxr_plane_detector
390390+ */
391391+static inline XrPlaneDetectorEXT
392392+oxr_plane_detector_to_openxr(struct oxr_plane_detector_ext *plane_detector)
393393+{
394394+ return XRT_CAST_PTR_TO_OXR_HANDLE(XrPlaneDetectorEXT, plane_detector);
395395+}
396396+#endif // OXR_HAVE_EXT_plane_detection
383397384398/*!
385399 * To go back to a OpenXR object.
···28382852 uint32_t device_count;
28392853};
28402854#endif // OXR_HAVE_MNDX_xdev_space
28552855+28562856+#ifdef OXR_HAVE_EXT_plane_detection
28572857+/*!
28582858+ * A Plane Detector.
28592859+ *
28602860+ * Parent type/handle is @ref oxr_session
28612861+ *
28622862+ *
28632863+ * @obj{XrPlaneDetectorEXT}
28642864+ * @extends oxr_handle_base
28652865+ */
28662866+struct oxr_plane_detector_ext
28672867+{
28682868+ //! Common structure for things referred to by OpenXR handles.
28692869+ struct oxr_handle_base handle;
28702870+28712871+ //! Owner of this anchor.
28722872+ struct oxr_session *sess;
28732873+28742874+ //! Plane detector flags.
28752875+ enum xrt_plane_detector_flags_ext flags;
28762876+28772877+ //! The last known state of this plane detector.
28782878+ XrPlaneDetectionStateEXT state;
28792879+28802880+ //! Whether the last DONE plane detection has been retrieved from the xdev.
28812881+ bool retrieved;
28822882+28832883+ //! The device that this plane detector belongs to.
28842884+ struct xrt_device *xdev;
28852885+28862886+ //! Detected planes. xrt_plane_detector_locations_ext::relation is kept in xdev space and not updated.
28872887+ struct xrt_plane_detections_ext detections;
28882888+28892889+ //! Corresponds to xrt_plane_detections_ext::locations, but with OpenXR types and transformed into target space.
28902890+ //! Enables two call idiom.
28912891+ XrPlaneDetectorLocationEXT *xr_locations;
28922892+28932893+ //! A globally unique id for the current plane detection or 0, generated by the xrt_device.
28942894+ uint64_t detection_id;
28952895+};
28962896+#endif // OXR_HAVE_EXT_plane_detection
2841289728422898/*!
28432899 * @}
+14
src/xrt/state_trackers/oxr/oxr_system.c
···508508 }
509509#endif // OXR_HAVE_MNDX_xdev_space
510510511511+#ifdef OXR_HAVE_EXT_plane_detection
512512+ XrSystemPlaneDetectionPropertiesEXT *plane_detection_props = NULL;
513513+ if (sys->inst->extensions.EXT_plane_detection) {
514514+ plane_detection_props = OXR_GET_OUTPUT_FROM_CHAIN(
515515+ properties, XR_TYPE_SYSTEM_PLANE_DETECTION_PROPERTIES_EXT, XrSystemPlaneDetectionPropertiesEXT);
516516+ }
517517+518518+ if (plane_detection_props) {
519519+ // for now these are mapped 1:1
520520+ plane_detection_props->supportedFeatures =
521521+ (XrPlaneDetectionCapabilityFlagsEXT)xdev->plane_capability_flags;
522522+ }
523523+#endif // OXR_HAVE_EXT_plane_detection
524524+511525 return XR_SUCCESS;
512526}
513527