1#ifndef VRPN_XINPUTGAMEPAD_H
2#define VRPN_XINPUTGAMEPAD_H
4#include "vrpn_Configure.h"
6#if defined(_WIN32) && defined(VRPN_USE_WINDOWS_XINPUT)
8#include "vrpn_Analog.h"
9#include "vrpn_Analog_Output.h"
10#include "vrpn_Button.h"
11#include "vrpn_Connection.h"
20 vrpn_XInputGamepad(
const char *name,
vrpn_Connection *c = NULL,
unsigned int controllerIndex = 0);
21 ~vrpn_XInputGamepad();
27 static int VRPN_CALLBACK handle_request_message(
void *selfPtr,
vrpn_HANDLERPARAM data);
28 static int VRPN_CALLBACK handle_request_channels_message(
void *selfPtr,
vrpn_HANDLERPARAM data);
29 static int VRPN_CALLBACK handle_last_connection_dropped(
void *selfPtr,
vrpn_HANDLERPARAM data);
32 void report_changes (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
34 void report (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
38 void update_vibration();
41 virtual vrpn_float64 normalize_axis(SHORT axis, SHORT deadzone)
const;
42 virtual vrpn_float64 normalize_trigger(BYTE trigger)
const;
43 virtual vrpn_float64 normalize_dpad(WORD buttons)
const;
46 unsigned int _controllerIndex;
定义 vrpn_Analog_Output.h:26
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
virtual void mainloop()=0
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
This structure is what is passed to a vrpn_Connection message callback.
定义 vrpn_Connection.h:41