OpenVRAction

OpenVRAction

Functions

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── OpenVRAction

Includes

#include <gxr.h>

Description

Functions

openvr_action_new ()

OpenVRAction *
openvr_action_new (void);

openvr_action_new_from_type_url ()

OpenVRAction *
openvr_action_new_from_type_url (OpenVRActionSet *action_set,
                                 OpenVRActionType type,
                                 char *url);

openvr_action_new_from_url ()

OpenVRAction *
openvr_action_new_from_url (OpenVRActionSet *action_set,
                            char *url);

openvr_action_load_manifest ()

gboolean
openvr_action_load_manifest (char *path);

openvr_action_poll ()

gboolean
openvr_action_poll (OpenVRAction *self);

openvr_action_poll_analog ()

gboolean
openvr_action_poll_analog (OpenVRAction *self);

openvr_action_poll_digital ()

gboolean
openvr_action_poll_digital (OpenVRAction *self);

openvr_action_trigger_haptic ()

gboolean
openvr_action_trigger_haptic (OpenVRAction *self,
                              float start_seconds_from_now,
                              float duration_seconds,
                              float frequency,
                              float amplitude);

openvr_action_get_action_type ()

OpenVRActionType
openvr_action_get_action_type (OpenVRAction *self);

openvr_action_poll_pose_next_frame ()

gboolean
openvr_action_poll_pose_next_frame (OpenVRAction *self);

openvr_action_poll_pose_secs_from_now ()

gboolean
openvr_action_poll_pose_secs_from_now (OpenVRAction *self,
                                       float secs);

openvr_action_update_input_handles ()

void
openvr_action_update_input_handles (OpenVRAction *self);

Types and Values

OpenVRAction

typedef struct _OpenVRAction OpenVRAction;

enum OpenVRActionType

The type of the OpenVR action.

Members

OPENVR_ACTION_DIGITAL

A digital action.

 

OPENVR_ACTION_ANALOG

An analog action.

 

OPENVR_ACTION_POSE

A pose action.

 

OpenVRAnalogEvent

typedef struct {
  gboolean active;
  graphene_vec3_t state;
  graphene_vec3_t delta;
  guint64 controller_handle;
  gfloat time;
} OpenVRAnalogEvent;

Analog event.

Members

gboolean active;

Whether or not this action is currently available to be bound in the active action set.

 

graphene_vec3_t state;

A graphene_vec3_t analog state.

 

graphene_vec3_t delta;

State delta since last event.

 

guint64 controller_handle;

The controller identifier.

 

gfloat time;

The time of the event.

 

OpenVRDigitalEvent

typedef struct {
  gboolean active;
  gboolean state;
  gboolean changed;
  guint64 controller_handle;
  gfloat time;
} OpenVRDigitalEvent;

Digital event.

Members

gboolean active;

Whether or not this action is currently available to be bound in the active action set.

 

gboolean state;

Pressed or released.

 

gboolean changed;

Whether the state has changed since last event.

 

guint64 controller_handle;

The controller identifier.

 

gfloat time;

The time of the event.

 

OPENVR_TYPE_ACTION

#define OPENVR_TYPE_ACTION openvr_action_get_type()

Signal Details

The “analog-event” signal

void
user_function (OpenVRAction *openvraction,
               GdkEvent     *arg1,
               gpointer      user_data)

Flags: Run Last


The “digital-event” signal

void
user_function (OpenVRAction *openvraction,
               GdkEvent     *arg1,
               gpointer      user_data)

Flags: Run Last


The “pose-event” signal

void
user_function (OpenVRAction *openvraction,
               GdkEvent     *arg1,
               gpointer      user_data)

Flags: Run First