Monado OpenXR Runtime

Variant type for input transforms. More...

#include <oxr/oxr_input_transform.h>

Collaboration diagram for oxr_input_transform:

Public Member Functions

void oxr_input_transform_destroy (struct oxr_input_transform **transform_ptr)
 Destroy an array of input transforms. More...
 
bool oxr_input_transform_process (struct oxr_input_transform *transforms, size_t transform_count, const struct oxr_input_value_tagged *input, struct oxr_input_value_tagged *out)
 Apply an array of input transforms. More...
 
bool oxr_input_transform_init_root (struct oxr_input_transform *transform, enum xrt_input_type input_type)
 Allocate an identity transform serving as the root/head of the transform chain. More...
 
bool oxr_input_transform_init_vec2_get_x (struct oxr_input_transform *transform, const struct oxr_input_transform *parent)
 Allocate a transform to get the X component of a Vec2. More...
 
bool oxr_input_transform_init_vec2_get_y (struct oxr_input_transform *transform, const struct oxr_input_transform *parent)
 Allocate a transform to get the Y component of a Vec2. More...
 
bool oxr_input_transform_init_threshold (struct oxr_input_transform *transform, const struct oxr_input_transform *parent, float threshold, bool invert)
 Allocate a transform to threshold a float to a bool. More...
 
bool oxr_input_transform_init_bool_to_vec1 (struct oxr_input_transform *transform, const struct oxr_input_transform *parent, enum xrt_input_type result_type, float true_val, float false_val)
 Allocate a transform to turn a bool into an arbitrary 1D float. More...
 

Data Fields

enum oxr_input_transform_type type
 The type of this transform. More...
 
enum xrt_input_type result_type
 The type output by this transform. More...
 
union {
   struct oxr_input_transform_threshold_data   threshold
 Populated when oxr_input_transform::type is INPUT_TRANSFORM_THRESHOLD. More...
 
   struct oxr_input_transform_bool_to_vec1_data   bool_to_vec1
 Populated when oxr_input_transform::type is INPUT_TRANSFORM_BOOL_TO_VEC1. More...
 
   struct oxr_input_transform_dpad_data   dpad_state
 Populated when oxr_input_transform::type is INPUT_TRANSFORM_DPAD. More...
 
data
 

Related Functions

(Note that these are not member functions.)

bool oxr_input_transform_create_chain (struct oxr_logger *log, struct oxr_sink_logger *slog, enum xrt_input_type input_type, XrActionType result_type, const char *action_name, const char *bound_path_string, struct oxr_input_transform **out_transforms, size_t *out_transform_count)
 Create a transform array to convert input_type to result_type. More...
 
bool oxr_input_transform_create_chain_dpad (struct oxr_logger *log, struct oxr_sink_logger *slog, enum xrt_input_type input_type, XrActionType result_type, const char *bound_path_string, struct oxr_dpad_binding_modification *dpad_binding_modification, enum oxr_dpad_region dpad_region, enum xrt_input_type activation_input_type, struct xrt_input *activation_input, struct oxr_input_transform **out_transforms, size_t *out_transform_count)
 Create a transform array to process a 2D input plus activation input to a dpad. More...
 

Detailed Description

Variant type for input transforms.

Some values for type do not have any additional data in the union

Field Documentation

◆ bool_to_vec1

struct oxr_input_transform_bool_to_vec1_data oxr_input_transform::bool_to_vec1

Populated when oxr_input_transform::type is INPUT_TRANSFORM_BOOL_TO_VEC1.

Referenced by oxr_input_transform_init_bool_to_vec1().

◆ dpad_state

struct oxr_input_transform_dpad_data oxr_input_transform::dpad_state

Populated when oxr_input_transform::type is INPUT_TRANSFORM_DPAD.

◆ result_type

◆ threshold

struct oxr_input_transform_threshold_data oxr_input_transform::threshold

Populated when oxr_input_transform::type is INPUT_TRANSFORM_THRESHOLD.

Referenced by oxr_input_transform_init_threshold().

◆ type

enum oxr_input_transform_type oxr_input_transform::type

The type of this transform.

Some values imply that a member of oxr_input_transform::data is populated.

Referenced by oxr_input_transform_init_bool_to_vec1(), oxr_input_transform_init_root(), oxr_input_transform_init_threshold(), oxr_input_transform_init_vec2_get_x(), and oxr_input_transform_init_vec2_get_y().


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