|
Drag[en]gine Script Module DragonScript 1.32.1
|
Binding of command to input event on device. More...
Public Member Functions | |
| bool | equals (Object other) |
| Bindings are equal. | |
| Command | getCommand () |
| Bound command. | |
| float | getDeadzone () |
| Deadzone as percentage of range (0..1). | |
| String | getDeviceID () |
| Input device identifier. | |
| int | getDeviceIndex () |
| Device index or -1 if not set. | |
| InputDevice | getInputDevice () |
| Device or null if not set. | |
| InputDeviceAxis | getInputDeviceAxis () |
| Device axis or null if not set. | |
| InputDeviceButton | getInputDeviceButton () |
| Device button or null if not set. | |
| InputDeviceFeedback | getInputDeviceFeedback () |
| Device feedback or null if not set. | |
| bool | getInverseAxis () |
| Inverse axis. | |
| float | getLinearity () |
| Linearity of input. | |
| bool | getSimulateAxisPressed () |
| Axis pressed simulation state. | |
| String | getSourceID () |
| Axis or button identifier. | |
| int | getSourceIndex () |
| Source index or -1 if not set. | |
| InputEventSource | getSystem () |
| System or null if not set. | |
| bool | getVRHandFacingUser () |
| VR hand has to face user. | |
| float | mapAxisValue (float value) |
| Map axis value using deadzone and linearity. | |
| Binding | new (Binding binding) |
| Create copy of binding. | |
| Binding | new (Binding binding, Command command) |
| Create copy of binding with different command. | |
| Binding | new (String deviceID, String sourceID, Command command) |
| Create binding. | |
| Binding | new (String deviceID, String sourceID, Command command, bool inverseAxis) |
| Create binding. | |
| void | setDeadzone (float deadzone) |
| Set deadzone as percentage of range (0..1). | |
| void | setDeviceIndex (int index) |
| Set device index or -1 if not set. | |
| void | setInverseAxis (bool inverseAxis) |
| Set inverse axis. | |
| void | setLinearity (float linearity) |
| Set linearity of input. | |
| void | setSimulateAxisPressed (bool pressed) |
| Set axis pressed simulation state. | |
| void | setSourceIndex (int index) |
| Set source index or -1 if not set. | |
| void | setSystem (InputEventSource system) |
| Set system or null if not set. | |
| void | setVRHandFacingUser (bool facingUser) |
| Set VR hand has to face user. | |
Public Attributes | |
| Command | pCommand |
| float | pDeadzone |
| String | pDeviceID |
| int | pDeviceIndex |
| bool | pInverseAxis |
| InputEventSource | pSystem |
Binding of command to input event on device.
Bindings are identified by device and either axis or button identifier. For quicker access the device and button index are used.
| bool Dragengine.Commands.Binding.equals | ( | Object | other | ) |
Bindings are equal.
| Command Dragengine.Commands.Binding.getCommand | ( | ) |
Bound command.
| float Dragengine.Commands.Binding.getDeadzone | ( | ) |
Deadzone as percentage of range (0..1).
For use with absolute axis input in the range from -1 to 1 or 0 to 1.
| String Dragengine.Commands.Binding.getDeviceID | ( | ) |
Input device identifier.
| int Dragengine.Commands.Binding.getDeviceIndex | ( | ) |
Device index or -1 if not set.
| InputDevice Dragengine.Commands.Binding.getInputDevice | ( | ) |
Device or null if not set.
| InputDeviceAxis Dragengine.Commands.Binding.getInputDeviceAxis | ( | ) |
Device axis or null if not set.
| InputDeviceButton Dragengine.Commands.Binding.getInputDeviceButton | ( | ) |
Device button or null if not set.
| InputDeviceFeedback Dragengine.Commands.Binding.getInputDeviceFeedback | ( | ) |
Device feedback or null if not set.
| bool Dragengine.Commands.Binding.getInverseAxis | ( | ) |
Inverse axis.
| float Dragengine.Commands.Binding.getLinearity | ( | ) |
Linearity of input.
Value of 0 is linear input. Values up to 1 map larger input range to small movement. Values down to -1 map larger input range to larger movement. 0 is the default.
Linearity is calculated like this:
| Linearity | Mapped value (x=input) |
|---|---|
| 0 | x |
| 1/3 | pow(x, 2) |
| 2/3 | pow(x, 4) |
| 1 | pow(x, 8) |
| -1/3 | pow(x, 1/2) |
| -2/3 | pow(x, 1/4) |
| -1 | pow(x, 1/8) |
For use with absolute axis input in the range from -1 to 1 or 0 to 1.
| bool Dragengine.Commands.Binding.getSimulateAxisPressed | ( | ) |
Axis pressed simulation state.
| String Dragengine.Commands.Binding.getSourceID | ( | ) |
Axis or button identifier.
| int Dragengine.Commands.Binding.getSourceIndex | ( | ) |
Source index or -1 if not set.
| InputEventSource Dragengine.Commands.Binding.getSystem | ( | ) |
System or null if not set.
| bool Dragengine.Commands.Binding.getVRHandFacingUser | ( | ) |
VR hand has to face user.
| float Dragengine.Commands.Binding.mapAxisValue | ( | float | value | ) |
Map axis value using deadzone and linearity.
| value | Value in the range from -1 to 1. |
For use with absolute axis input in the range from -1 to 1 or 0 to 1.
Create copy of binding with different command.
Create binding.
| Binding Dragengine.Commands.Binding.new | ( | String | deviceID, |
| String | sourceID, | ||
| Command | command, | ||
| bool | inverseAxis | ||
| ) |
Create binding.
| void Dragengine.Commands.Binding.setDeadzone | ( | float | deadzone | ) |
Set deadzone as percentage of range (0..1).
For use with absolute axis input in the range from -1 to 1 or 0 to 1.
| void Dragengine.Commands.Binding.setDeviceIndex | ( | int | index | ) |
Set device index or -1 if not set.
| void Dragengine.Commands.Binding.setInverseAxis | ( | bool | inverseAxis | ) |
Set inverse axis.
| void Dragengine.Commands.Binding.setLinearity | ( | float | linearity | ) |
Set linearity of input.
For use with absolute axis input in the range from -1 to 1 or 0 to 1.
| void Dragengine.Commands.Binding.setSimulateAxisPressed | ( | bool | pressed | ) |
Set axis pressed simulation state.
| void Dragengine.Commands.Binding.setSourceIndex | ( | int | index | ) |
Set source index or -1 if not set.
| void Dragengine.Commands.Binding.setSystem | ( | InputEventSource | system | ) |
Set system or null if not set.
| void Dragengine.Commands.Binding.setVRHandFacingUser | ( | bool | facingUser | ) |
Set VR hand has to face user.
| Command Dragengine.Commands.Binding.pCommand |
| float Dragengine.Commands.Binding.pDeadzone |
| String Dragengine.Commands.Binding.pDeviceID |
| int Dragengine.Commands.Binding.pDeviceIndex |
| bool Dragengine.Commands.Binding.pInverseAxis |
| InputEventSource Dragengine.Commands.Binding.pSystem |