Monado OpenXR Runtime
Data Fields
xrt_view Struct Reference

A per-lens view information. More...

#include <xrt/xrt_device.h>

Collaboration diagram for xrt_view:
Collaboration graph
[legend]

Data Fields

struct {
   uint32_t   x_pixels
 
   uint32_t   y_pixels
 
   uint32_t   w_pixels
 
   uint32_t   h_pixels
 
viewport
 Viewpport position on the screen, in absolute screen coordinates, this field is only used by Compositor to setup the device rendering. More...
 
struct {
   uint32_t   w_pixels
 
   uint32_t   h_pixels
 
   float   w_meters
 
   float   h_meters
 
display
 Pixel and phyisical properties of this display, not in absolute screen coordinates that the compositor sees. More...
 
struct {
   float   x_meters
 
   float   y_meters
 
lens_center
 Position in meters relative to display origin, before any rotation is applied by xrt_view::rot. More...
 
struct xrt_matrix_2x2 rot
 Rotation 2d matrix used to rotate the position of the output of the distortion shaders onto the screen. More...
 
struct xrt_fov fov
 Fov expressed in OpenXR. More...
 

Detailed Description

A per-lens view information.

Field Documentation

◆ display

struct { ... } xrt_view::display

Pixel and phyisical properties of this display, not in absolute screen coordinates that the compositor sees.

So before any rotation is applied by xrt_view::rot.

The xrt_view::display::w_pixels & xrt_view::display::h_pixels become the recommdnded image size for this view.

Referenced by u_device_dump_config(), and u_device_setup_split_side_by_side().

◆ fov

struct xrt_fov xrt_view::fov

Fov expressed in OpenXR.

Referenced by u_device_dump_config(), and u_device_setup_split_side_by_side().

◆ h_meters

float xrt_view::h_meters

◆ h_pixels

uint32_t xrt_view::h_pixels

◆ lens_center

struct { ... } xrt_view::lens_center

Position in meters relative to display origin, before any rotation is applied by xrt_view::rot.

Referenced by u_device_dump_config(), and u_device_setup_split_side_by_side().

◆ rot

struct xrt_matrix_2x2 xrt_view::rot

Rotation 2d matrix used to rotate the position of the output of the distortion shaders onto the screen.

Should the distortion shader be based on mesh then this matrix rotates the vertex positions.

Referenced by u_device_dump_config(), and u_device_setup_split_side_by_side().

◆ viewport

struct { ... } xrt_view::viewport

Viewpport position on the screen, in absolute screen coordinates, this field is only used by Compositor to setup the device rendering.

If the view is being rotated by xrt_view.rot 90° right in the distortion shader then display.w_pixels == viewport.h_pixels & display.h_pixels == viewport.w_pixels.

Referenced by u_device_dump_config(), and u_device_setup_split_side_by_side().

◆ w_meters

float xrt_view::w_meters

◆ w_pixels

uint32_t xrt_view::w_pixels

◆ x_meters

float xrt_view::x_meters

◆ x_pixels

uint32_t xrt_view::x_pixels

◆ y_meters

float xrt_view::y_meters

◆ y_pixels

uint32_t xrt_view::y_pixels

The documentation for this struct was generated from the following file: