Panda3D
|
This is a type of device that uses the Linux /dev/input/js# API to read data from a game controller. More...
Public Member Functions | |
__init__ (LinuxInputDeviceManager manager, int index) | |
Creates a new device using the Linux joystick device with the given index. More... | |
bool | checkEvents () |
Returns true if there are pending events. More... | |
![]() | |
disablePointerEvents () | |
Disables the generation of mouse-movement events. More... | |
enablePointerEvents () | |
Enables the generation of mouse-movement events. More... | |
InputDevice::AxisState | findAxis (InputDevice::Axis axis) |
Returns the first AnalogAxis found with the given axis, or throw an assert if the axis was not found in the list. More... | |
InputDevice::ButtonState | findButton (ButtonHandle handle) |
Returns the first ButtonState found with the given axis, or throw an assert if the button handle was not found in the list. More... | |
ButtonEventList | getButtonEvents () |
Returns the list of recently-generated ButtonEvents. More... | |
PointerEventList | getPointerEvents () |
Returns a PointerEventList containing all the recent pointer events. More... | |
bool | hasButtonEvent () |
Returns true if this device has a pending button event (a mouse button or keyboard button down/up), false otherwise. More... | |
bool | hasFeature (InputDevice::Feature feature) |
Returns true if the device supports the indicated feature. More... | |
bool | hasPointerEvent () |
Returns true if this device has a pending pointer event (a mouse movement), or false otherwise. More... | |
mapAxis (int index, InputDevice::Axis axis) | |
Associates the indicated Axis with the axis of the indicated index number. More... | |
mapButton (int index, ButtonHandle handle) | |
Associates the indicated ButtonHandle with the button of the indicated index number. More... | |
output (Ostream out) | |
Writes a one-line string describing the device. More... | |
poll () | |
Polls the input device for new activity, to ensure it contains the latest events. More... | |
setVibration (double strong, double weak) | |
Sets the strength of the vibration effect, if supported. More... | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More... | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. More... | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. More... | |
![]() | |
int | getRefCount () |
Returns the current reference count. More... | |
ref () | |
Explicitly increments the reference count. More... | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
bool | unref () |
Explicitly decrements the reference count. More... | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
Additional Inherited Members | |
![]() | |
enum | Axis { none = 0, x = 1, y = 2, z = 3, yaw = 4, pitch = 5, roll = 6, left_x = 7, left_y = 8, left_trigger = 9, right_x = 10, right_y = 11, right_trigger = 12, throttle = 13, rudder = 14, wheel = 15, accelerator = 16, brake = 17 } |
enum | DeviceClass { unknown = 0, virtual_device = 1, keyboard = 2, mouse = 3, touch = 4, gamepad = 5, flight_stick = 6, steering_wheel = 7, dance_pad = 8, hmd = 9, spatial_mouse = 10 } |
enum | Feature { pointer = 0, keyboard = 2, tracker = 2, vibration = 3, battery = 4 } |
enum | State { S_unknown = 0, S_up = 1, S_down = 2 } |
![]() | |
InputDevice::Axes | _axes |
InputDevice::BatteryData | _battery_data |
InputDevice::Buttons | _buttons |
PointerData | _pointer_data |
TrackerData | _tracker_data |
InputDevice::AxisState | axes [] |
InputDevice::BatteryData | battery |
Returns a rough indication of the battery level, ranging from 0 (completely empty battery) to the indicated max_level value. More... | |
InputDevice::ButtonState | buttons [] |
Make device buttons and axes iterable. More... | |
bool | connected |
This is false if we know that the device is not currently connected. May report false positives if we can't know this with certainty. More... | |
InputDevice::DeviceClass | device_class |
This contains an identification of the general type of device. If this could not be determined, it is set to DC_unknown. More... | |
String | manufacturer |
The device's manufacturer, or the empty string if not known. More... | |
String | name |
The human-readable name of this input device. More... | |
unsigned short int | product_id |
USB product ID of the device, or 0 if not known. More... | |
String | serial_number |
The device's serial number, or the empty string if not known. More... | |
TrackerData | tracker |
Getters for the various types of device data. More... | |
unsigned short int | vendor_id |
USB vendor ID of the device, or 0 if not known. More... | |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. More... | |
![]() | |
int | ref_count |
The current reference count. More... | |
This is a type of device that uses the Linux /dev/input/js# API to read data from a game controller.
__init__ | ( | LinuxInputDeviceManager | manager, |
int | index | ||
) |
Creates a new device using the Linux joystick device with the given index.
bool checkEvents | ( | ) |
Returns true if there are pending events.
|
static |