QarGuiPanelSize Struct
The three frames every GUI panel API is expressed in. More...
Declaration
Included Headers
Public Member Attributes Index
| float | content_scale |
| float | height_meters |
| float | width_meters |
|
Extent of the panel surface along panel-space X, in metres. More... | |
Description
The three frames every GUI panel API is expressed in.
Room space is the session's shared tracking space: right-handed, metres, +Y up. Every QarPose in the GUI panel API - QarGuiPanelInit::pose, qar_gui_panels_update_pose(), qar_gui_panel_get_pose() - is given in it.
Panel space is the frame that pose defines. Its origin is the midpoint of the panel's top edge - the top centre, not a corner - and its axes are right-handed, described here as a viewer facing the panel front sees them:
- +X runs along the top edge to the viewer's left,
- +Y runs up,
- -Z is the front-face normal and points at the viewer. The front normal is -Z, not +Z: left x up points away from the viewer, so a +Z viewer-facing normal would not be right-handed. The renderer agrees - the panel surface sits at its bounds' minimum Z and the interaction volume grows along StereoKit's vec3_forward, (0, 0, -1). The panel surface therefore covers x in [-width_meters/2, +width_meters/2] and y in [-height_meters, 0], hanging below its own pose.
Panel content space is the 2D pixel raster drawn onto that surface: the browser bitmap of a QAR_GUI_PANEL_CONTENT_TYPE_WEBSITE_URI panel, or the decoded video image of a QAR_GUI_PANEL_CONTENT_TYPE_STREAM_ID one. Its origin is the panel's top-left corner as the viewer sees it, +X runs right and +Y runs down, and it is the frame QarGuiPanelPoint reports positions in. Panel content space runs backwards along both panel axes: content x = 0 sits at panel-space +width_meters/2 and content y = 0 at panel-space 0, the top edge, so content x advances along panel-space -X and content y along panel-space -Y. Panel content space is mapped onto panel space by QarGuiPanelSize::content_scale.
Definition at line 834 of file qar_streaming.h.
Public Member Attributes
content_scale
|
Panel-content-space-per-panel-space zoom of the rendered raster. 1.0 fits the content across the full panel surface, 2.0 shows it at twice the size so only half of it fits, and 0.5 shows it at half size. It changes how the content is drawn and how a contact maps back to content pixels; it does not change width_meters or height_meters.
A QAR_GUI_PANEL_CONTENT_TYPE_WEBSITE_URI panel takes it as the page's zoom, as a desktop browser's Ctrl+ and Ctrl- do: the page is drawn that much larger and reflowed to the panel's width, so nothing is cut off at the sides. Only the application sets it; the panel's + and - buttons resize the panel instead (ADR-0165, ADR-0167).
A QAR_GUI_PANEL_CONTENT_TYPE_STREAM_ID panel ignores it: its video is always drawn at the full panel width and scrolled vertically by the renderer when it is taller than the panel (ADR-0150).
Definition at line 856 of file qar_streaming.h.
height_meters
|
Extent of the panel surface along panel-space -Y, in metres. The surface hangs below the pose, which sits on its top edge.
Definition at line 840 of file qar_streaming.h.
width_meters
|
Extent of the panel surface along panel-space X, in metres.
Definition at line 837 of file qar_streaming.h.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.9.8.