Monado OpenXR Runtime
|
Each plane has n polygons; ultimately plane metadata from locations and vetices is reconstructed. More...
#include <xrt/xrt_plane_detector.h>
Data Fields | |
uint32_t | location_count |
How many locations were found. More... | |
uint32_t | location_size |
size of locations and polygon_info_start_index arrays. More... | |
struct xrt_plane_detector_location_ext * | locations |
! array of detected locations. More... | |
uint32_t * | polygon_info_start_index |
Parallel array to locations. More... | |
uint32_t | polygon_info_size |
size of polygon_infos array. More... | |
struct xrt_plane_polygon_info_ext * | polygon_infos |
Continuous array of polygon_infos of all polygons for all planes of a query. More... | |
uint32_t | vertex_size |
size of vertices array. More... | |
struct xrt_vec2 * | vertices |
Continuous array of polygon vertices of all polygons for all planes of a query. More... | |
Each plane has n polygons; ultimately plane metadata from locations and vetices is reconstructed.
Therefore lay out the data in flattened arrays:
locations stores continuous metadata for each plane: location 1 | location 2 | location 3 | location 4 | ...
polygon_info_start_index is a helper array to go from a location entry to a polygon_info entry.
polygon_info stores info (metadata) for each polygon, flattened: plane 1 polygon 1 info | plane 1 polygon 2 info | ... | plane 2 polygon 1 info | ...
polygon_info.vertices_start_index is a helper array to go from a polygon_info entry to vertices entry.
vertices stores vertex data for each polygon, for each plane, flattened: plane 1 polygon 1 vertex 1 | plane 1 polygon 1 vertex 2 | ... | plane 1 polygon 2 vertex 1 | ...
To reconstruct the vertices of a certain plane polygon:
Convention: Whoever writes to this struct checks the size values first and reallocates arrays if necessary.
uint32_t xrt_plane_detections_ext::location_count |
How many locations were found.
uint32_t xrt_plane_detections_ext::location_size |
size of locations and polygon_info_start_index arrays.
struct xrt_plane_detector_location_ext* xrt_plane_detections_ext::locations |
! array of detected locations.
Referenced by xrt_plane_detections_ext_clear().
uint32_t xrt_plane_detections_ext::polygon_info_size |
size of polygon_infos array.
uint32_t* xrt_plane_detections_ext::polygon_info_start_index |
Parallel array to locations.
Index into polygon_info of polygon_infos for all planes of a query.
Referenced by xrt_plane_detections_ext_clear().
struct xrt_plane_polygon_info_ext* xrt_plane_detections_ext::polygon_infos |
Continuous array of polygon_infos of all polygons for all planes of a query.
Referenced by xrt_plane_detections_ext_clear().
uint32_t xrt_plane_detections_ext::vertex_size |
size of vertices array.
struct xrt_vec2* xrt_plane_detections_ext::vertices |
Continuous array of polygon vertices of all polygons for all planes of a query.
Referenced by xrt_plane_detections_ext_clear().