47 float distortion_k[5];
51 uint32_t w_pixels, h_pixels;
52 float w_meters, h_meters;
void u_distortion_cardboard_calculate(const struct u_cardboard_distortion_arguments *args, struct xrt_hmd_parts *parts, struct u_cardboard_distortion *out_dist)
Take cardboard arguments to turn them into a u_cardboard_distortion and fill out a xrt_hmd_parts stru...
Definition: u_distortion.c:33
Helper struct to make code easier to read.
Definition: render_distortion.c:183
These are the values that you need to supply to the distortion code to setup a u_cardboard_distortion...
Definition: u_distortion.h:46
float screen_to_lens_distance_meters
The distance to the lens from the screen, used to calculate calculate tanangle of various distances o...
Definition: u_distortion.h:62
float tray_to_lens_distance_meters
The distance from the tray (the bottom of the screen) to the lens center on the Y axis.
Definition: u_distortion.h:67
struct xrt_fov fov
Fov values that the cardboard configuration has given us.
Definition: u_distortion.h:70
float inter_lens_distance_meters
Distances between the lenses in meters.
Definition: u_distortion.h:56
enum u_cardboard_vertical_alignment vertical_alignment
The vertical screen alignment.
Definition: u_distortion.h:73
Values to create a distortion mesh from cardboard values.
Definition: u_distortion.h:87
struct xrt_vec2 size
Used to transform to and from tanangle space.
Definition: u_distortion.h:94
float distortion_k[5]
Cardboard distortion k values.
Definition: u_distortion.h:89
struct xrt_vec2 offset
Used to transform to and from tanangle space.
Definition: u_distortion.h:96
Both given and derived values needed for cardboard distortion.
Definition: u_distortion.h:106
struct u_cardboard_distortion_arguments args
Arguments this distortion was created from.
Definition: u_distortion.h:108
struct u_cardboard_distortion_values values[XRT_MAX_VIEWS]
Distortion parameters, some derived from args.
Definition: u_distortion.h:111
Describes a projection matrix fov.
Definition: xrt_defines.h:498
All of the device components that deals with interfacing to a users head.
Definition: xrt_device.h:92
A 2 element vector with single floats.
Definition: xrt_defines.h:267
u_cardboard_vertical_alignment
Definition: u_distortion.h:28
@ U_CARDBOARD_VERTICAL_ALIGNMENT_TOP
device rests against a fixed top tray
Definition: u_distortion.h:36
@ U_CARDBOARD_VERTICAL_ALIGNMENT_CENTER
device screen assumed to be centered w.r.t. lenses
Definition: u_distortion.h:33
@ U_CARDBOARD_VERTICAL_ALIGNMENT_BOTTOM
device rests against a fixed bottom tray
Definition: u_distortion.h:30
Common defines and enums for XRT.