Monado OpenXR Runtime
Loading...
Searching...
No Matches

Variant type for input transforms. More...

#include <oxr/actions/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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 

Data Fields

enum oxr_input_transform_type type
 The type of this transform.
 
enum xrt_input_type result_type
 The type output by this transform.
 
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 Symbols

(Note that these are not member symbols.)

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.
 
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.
 

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(), and oxr_input_transform_process().

◆ dpad_state

struct oxr_input_transform_dpad_data oxr_input_transform::dpad_state

Populated when oxr_input_transform::type is INPUT_TRANSFORM_DPAD.

Referenced by oxr_input_transform_process().

◆ 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(), and oxr_input_transform_process().

◆ type

enum oxr_input_transform_type oxr_input_transform::type

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