Drag[en]gine Script Module DragonScript
1.21
|
Input device information. More...
Public Member Functions | |
Management | |
InputEventSource | getSource () |
System owning the device. More... | |
int | getIndex () |
Device index. More... | |
String | getID () |
Device identifier. More... | |
String | getName () |
Display name. More... | |
InputDeviceType | getType () |
Device type. More... | |
Model | getDisplayModel () |
Model to represent the device in 3D user interfaces or null if not set. More... | |
Skin | getDisplaySkin () |
Skin for display model or null if not set. More... | |
Image | getDisplayImage () |
Image to represent the device in 2D user interfaces or NULL if not set. More... | |
int | getDisplayIconCount () |
Count of icons representing the device in bindings. More... | |
Image | getDisplayIconAt (int index) |
Icon at index representing the device in bindings. More... | |
Image | getLargestDisplayIconX (int maxWidth) |
Largest icon not exceeding width representing the device in bindings. More... | |
Image | getLargestDisplayIconY (int maxHeight) |
Largest icon not exceeding height representing the device in bindings. More... | |
String | getDisplayText () |
Text to display centered across display image or icon. More... | |
InputDeviceBoneConfiguration | getBoneConfiguration () |
Device bone configuration. More... | |
Vector | getFingerTipOffset (int index) |
Finger tip offsets. More... | |
Rig | getHandRig () |
Hand rig if ebcHand is used. More... | |
bool | getSupportsFaceEyeExpressions () |
Device supports face eye expressions. More... | |
bool | getSupportsFaceMouthExpressions () |
Device supports face mouth expressions. More... | |
Model | getVRModel () |
Model to represent the device in VR environments or null if not set. More... | |
Skin | getVRSkin () |
Skin for VR model or null if not set. More... | |
bool | isPresent () |
Input device is present on the host platform. More... | |
int | getAxisCount () |
Number of axes. More... | |
InputDeviceAxis | getAxisAt (int index) |
Get wrapper for axis. More... | |
int | getButtonCount () |
Number of buttons. More... | |
InputDeviceButton | getButtonAt (int index) |
Get wrapper for button. More... | |
int | getFeedbackCount () |
Number of feedbacks. More... | |
InputDeviceFeedback | getFeedbackAt (int index) |
Get wrapper for feedback. More... | |
int | getComponentCount () |
Number of components. More... | |
InputDeviceComponent | getComponentAt (int index) |
Get wrapper for component. More... | |
int | buttonMatchingKeyCode (int keyCode) |
Index of button best matching key code or -1 if not found. More... | |
int | buttonMatchingKeyChar (int character) |
Index of button best matching character or -1 if not found. More... | |
int | buttonMatchingKeyCode (int keyCode, InputEventKeyLocation location) |
Index of button best matching key code or -1 if not found. More... | |
int | buttonMatchingKeyChar (int character, InputEventKeyLocation location) |
Index of button best matching character or -1 if not found. More... | |
Vector | getDevicePosePosition () |
Device pose position relative to tracking reference coordinate frame. More... | |
Quaternion | getDevicePoseOrientation () |
Device pose orientation relative to tracking reference coordinate frame. More... | |
Vector | getDevicePoseLinearVelocity () |
Device pose linear velocity relative to tracking reference coordinate frame. More... | |
Vector | getDevicePoseAngularVelocity () |
Device pose angular velocity relative to tracking reference coordinate frame. More... | |
Matrix | getDevicePoseMatrix () |
Device pose matrix relative to tracking reference coordinate frame. More... | |
int | getDeviceBonePoseCount () |
Count of device bone pose positions. More... | |
Vector | getDeviceBonePosePosition (int bone, bool withController) |
Device bone pose position relative to parent reference coordinate frame. More... | |
Quaternion | getDeviceBonePoseOrientation (int bone, bool withController) |
Device bone pose orientation relative to parent reference coordinate frame. More... | |
Matrix | getDeviceBonePoseMatrix (int bone, bool withController) |
Device bone pose matrix relative to parent reference coordinate frame. More... | |
int | getDeviceFaceExpressionCount () |
Count of device face expressions. More... | |
float | getDeviceFaceExpressionAt (int index) |
Device face expression. More... | |
Input device information.
Stores information about an input device attached to the host platform. The information stays present as long as a reference is hold to this instance. The input device itself can though be removed from the host system at any time without warning. To avoid exceptions due to missing input devices the input device can be still queried if not attached but returns a dummy state. Use the isPresent() method to check if the device is still attached to the host platform or not.
Input devices have a unique identifier valid across host platforms. Using this identifier the scripts can save control bindings in config files. Identifiers compose only of letters and the underscore.
This is a native class.
int Dragengine.InputDevice.buttonMatchingKeyChar | ( | int | character | ) |
Index of button best matching character or -1 if not found.
If more than one button matches the character the input module decides which button is the more likely choice. Once decided the input module is required to return the same button for the same character in subsequent queries unless a deInputEvent::eeDeviceParamsChanged event is issued.
Keys usually have different characters depending on the state of modifier keys. The input module matches character case insensitive to increase the chance to find a match. If mutliple keys match the character but under different modifier states the input module has to first select the key matching case sensitive then the key requiring less modifiers.
Can be used for example to locate keyboard keys to create default binding layouts without the user pressing input keys.
int Dragengine.InputDevice.buttonMatchingKeyChar | ( | int | character, |
InputEventKeyLocation | location | ||
) |
Index of button best matching character or -1 if not found.
Same as buttonMatchingKeyChar(int) but allows to distinguish between multiple keys of the same type, for example left and right shift key.
int Dragengine.InputDevice.buttonMatchingKeyCode | ( | int | keyCode | ) |
Index of button best matching key code or -1 if not found.
If more than one button matches the key code the input module decides which button is the more likely choice. Once decided the input module is required to return the same button for the same key code in subsequent queries unless a deInputEvent::eeDeviceParamsChanged event is issued.
Can be used for example to locate keyboard keys to create default binding layouts without the user pressing input keys.
int Dragengine.InputDevice.buttonMatchingKeyCode | ( | int | keyCode, |
InputEventKeyLocation | location | ||
) |
Index of button best matching key code or -1 if not found.
Same as buttonMatchingKeyChar(int) but allows to distinguish between multiple keys of the same type, for example left and right shift key.
InputDeviceAxis Dragengine.InputDevice.getAxisAt | ( | int | index | ) |
Get wrapper for axis.
EOutOfBoundary | index is less than 0 or larger than or equal to getAxisCount(). |
int Dragengine.InputDevice.getAxisCount | ( | ) |
Number of axes.
InputDeviceBoneConfiguration Dragengine.InputDevice.getBoneConfiguration | ( | ) |
Device bone configuration.
InputDeviceButton Dragengine.InputDevice.getButtonAt | ( | int | index | ) |
Get wrapper for button.
EOutOfBoundary | index is less than 0 or larger than or equal to getButtonCount(). |
int Dragengine.InputDevice.getButtonCount | ( | ) |
Number of buttons.
InputDeviceComponent Dragengine.InputDevice.getComponentAt | ( | int | index | ) |
Get wrapper for component.
EOutOfBoundary | index is less than 0 or larger than or equal to getComponentCount(). |
int Dragengine.InputDevice.getComponentCount | ( | ) |
Number of components.
int Dragengine.InputDevice.getDeviceBonePoseCount | ( | ) |
Count of device bone pose positions.
Matrix Dragengine.InputDevice.getDeviceBonePoseMatrix | ( | int | bone, |
bool | withController | ||
) |
Device bone pose matrix relative to parent reference coordinate frame.
withController | If true returns bone position as accurate as possible to the real hand position. If false remaps the position to simulate not holding the controller in hand. |
Quaternion Dragengine.InputDevice.getDeviceBonePoseOrientation | ( | int | bone, |
bool | withController | ||
) |
Device bone pose orientation relative to parent reference coordinate frame.
withController | If true returns bone position as accurate as possible to the real hand position. If false remaps the position to simulate not holding the controller in hand. |
Vector Dragengine.InputDevice.getDeviceBonePosePosition | ( | int | bone, |
bool | withController | ||
) |
Device bone pose position relative to parent reference coordinate frame.
bone | Index of bone to retrieve. |
withController | If true returns bone position as accurate as possible to the real hand position. If false remaps the position to simulate not holding the controller in hand. |
float Dragengine.InputDevice.getDeviceFaceExpressionAt | ( | int | index | ) |
Device face expression.
index | Index of face expression. Use InputDeviceFaceExpression constants. |
int Dragengine.InputDevice.getDeviceFaceExpressionCount | ( | ) |
Count of device face expressions.
Vector Dragengine.InputDevice.getDevicePoseAngularVelocity | ( | ) |
Device pose angular velocity relative to tracking reference coordinate frame.
Vector Dragengine.InputDevice.getDevicePoseLinearVelocity | ( | ) |
Device pose linear velocity relative to tracking reference coordinate frame.
Matrix Dragengine.InputDevice.getDevicePoseMatrix | ( | ) |
Device pose matrix relative to tracking reference coordinate frame.
Quaternion Dragengine.InputDevice.getDevicePoseOrientation | ( | ) |
Device pose orientation relative to tracking reference coordinate frame.
Vector Dragengine.InputDevice.getDevicePosePosition | ( | ) |
Device pose position relative to tracking reference coordinate frame.
Image Dragengine.InputDevice.getDisplayIconAt | ( | int | index | ) |
Icon at index representing the device in bindings.
Icon typically has a size of 16, 24, 32 or 64.
int Dragengine.InputDevice.getDisplayIconCount | ( | ) |
Count of icons representing the device in bindings.
Image Dragengine.InputDevice.getDisplayImage | ( | ) |
Image to represent the device in 2D user interfaces or NULL if not set.
Large image of 128 pixels squared or larger.
Model Dragengine.InputDevice.getDisplayModel | ( | ) |
Model to represent the device in 3D user interfaces or null if not set.
Skin Dragengine.InputDevice.getDisplaySkin | ( | ) |
Skin for display model or null if not set.
String Dragengine.InputDevice.getDisplayText | ( | ) |
Text to display centered across display image or icon.
InputDeviceFeedback Dragengine.InputDevice.getFeedbackAt | ( | int | index | ) |
Get wrapper for feedback.
EOutOfBoundary | index is less than 0 or larger than or equal to getFeedbackCount(). |
int Dragengine.InputDevice.getFeedbackCount | ( | ) |
Number of feedbacks.
Vector Dragengine.InputDevice.getFingerTipOffset | ( | int | index | ) |
Finger tip offsets.
For use with ebcHand bone configuration. Defines the offset of the finger tip point relative to the last finger segment coordinate frame. These are typically used to figure out where finger tips touch objects in the world.
Rig Dragengine.InputDevice.getHandRig | ( | ) |
Hand rig if ebcHand is used.
String Dragengine.InputDevice.getID | ( | ) |
Device identifier.
Unique identifier for the device identifying it across removing and attaching the device to the host system. The prefix is a normalized string that contains only letters, numbers and underscores. It is suitable to be combined with button or axis identifiers to store them in config files as key bindings.
int Dragengine.InputDevice.getIndex | ( | ) |
Device index.
Image Dragengine.InputDevice.getLargestDisplayIconX | ( | int | maxWidth | ) |
Largest icon not exceeding width representing the device in bindings.
Icon typically has a size of 16, 24, 32 or 64.
Image Dragengine.InputDevice.getLargestDisplayIconY | ( | int | maxHeight | ) |
Largest icon not exceeding height representing the device in bindings.
Icon typically has a size of 16, 24, 32 or 64.
String Dragengine.InputDevice.getName | ( | ) |
Display name.
Dispaly name is human readable like for example 'USB Gamepad #1'. The name is unique but not guaranteed to stay the same across restarting the input module or game engine.
InputEventSource Dragengine.InputDevice.getSource | ( | ) |
System owning the device.
Device index is only valid for the matching system.
bool Dragengine.InputDevice.getSupportsFaceEyeExpressions | ( | ) |
Device supports face eye expressions.
bool Dragengine.InputDevice.getSupportsFaceMouthExpressions | ( | ) |
Device supports face mouth expressions.
InputDeviceType Dragengine.InputDevice.getType | ( | ) |
Device type.
Model Dragengine.InputDevice.getVRModel | ( | ) |
Model to represent the device in VR environments or null if not set.
Skin Dragengine.InputDevice.getVRSkin | ( | ) |
Skin for VR model or null if not set.
bool Dragengine.InputDevice.isPresent | ( | ) |
Input device is present on the host platform.
Returns true if a device matching the identifier is currently attached to the host platform. If absent all values queried from the device are 0 to avoid exceptions to be thrown.