|
Drag[en]gine Script Module DragonScript 1.35
|
Input device information. More...
Public Member Functions | |
Management | |
| InputEventSource | getSource () |
| System owning the device. | |
| int | getIndex () |
| Device index. | |
| String | getID () |
| Device identifier. | |
| String | getName () |
| Display name. | |
| InputDeviceType | getType () |
| Device type. | |
| Model | getDisplayModel () |
| Model to represent the device in 3D user interfaces or null if not set. | |
| Skin | getDisplaySkin () |
| Skin for display model or null if not set. | |
| Image | getDisplayImage () |
| Image to represent the device in 2D user interfaces or NULL if not set. | |
| int | getDisplayIconCount () |
| Count of icons representing the device in bindings. | |
| Image | getDisplayIconAt (int index) |
| Icon at index representing the device in bindings. | |
| Image | getLargestDisplayIconX (int maxWidth) |
| Largest icon not exceeding width representing the device in bindings. | |
| Image | getLargestDisplayIconY (int maxHeight) |
| Largest icon not exceeding height representing the device in bindings. | |
| String | getDisplayText () |
| Text to display centered across display image or icon. | |
| InputDeviceBoneConfiguration | getBoneConfiguration () |
| Device bone configuration. | |
| Vector | getFingerTipOffset (int index) |
| Finger tip offsets. | |
| Rig | getHandRig () |
| Hand rig if InputDeviceBoneConfiguration#hand is used. | |
| Rig | getBodyRig () |
| Body rig if InputDeviceBoneConfiguration#upperBody or InputDeviceBoneConfiguration#fullBody is used. | |
| bool | getSupportsFaceEyeExpressions () |
| Device supports face eye expressions. | |
| bool | getSupportsFaceMouthExpressions () |
| Device supports face mouth expressions. | |
| bool | getUsingHandInteraction () |
| Device is using hand interaction. | |
| Model | getVRModel () |
| Model to represent the device in VR environments or null if not set. | |
| Skin | getVRSkin () |
| Skin for VR model or null if not set. | |
| InputDeviceVRTrackerRole | getVRTrackerRole () |
| VR tracker role. | |
| bool | isPresent () |
| Input device is present on the host platform. | |
| int | getAxisCount () |
| Number of axes. | |
| InputDeviceAxis | getAxisAt (int index) |
| Get wrapper for axis. | |
| int | getButtonCount () |
| Number of buttons. | |
| InputDeviceButton | getButtonAt (int index) |
| Get wrapper for button. | |
| int | getFeedbackCount () |
| Number of feedbacks. | |
| InputDeviceFeedback | getFeedbackAt (int index) |
| Get wrapper for feedback. | |
| int | getComponentCount () |
| Number of components. | |
| InputDeviceComponent | getComponentAt (int index) |
| Get wrapper for component. | |
| int | buttonMatchingKeyCode (int keyCode) |
| Index of button best matching key code or -1 if not found. | |
| int | buttonMatchingKeyChar (int character) |
| Index of button best matching character or -1 if not found. | |
| int | buttonMatchingKeyCode (int keyCode, InputEventKeyLocation location) |
| Index of button best matching key code or -1 if not found. | |
| int | buttonMatchingKeyChar (int character, InputEventKeyLocation location) |
| Index of button best matching character or -1 if not found. | |
| Vector | getDevicePosePosition () |
| Device pose position relative to tracking reference coordinate frame. | |
| Quaternion | getDevicePoseOrientation () |
| Device pose orientation relative to tracking reference coordinate frame. | |
| Vector | getDevicePoseLinearVelocity () |
| Device pose linear velocity relative to tracking reference coordinate frame. | |
| Vector | getDevicePoseAngularVelocity () |
| Device pose angular velocity relative to tracking reference coordinate frame. | |
| Matrix | getDevicePoseMatrix () |
| Device pose matrix relative to tracking reference coordinate frame. | |
| int | getDeviceBonePoseCount () |
| Count of device bone pose positions. | |
| Vector | getDeviceBonePosePosition (int bone, bool withController) |
| Device bone pose position relative to parent reference coordinate frame. | |
| Quaternion | getDeviceBonePoseOrientation (int bone, bool withController) |
| Device bone pose orientation relative to parent reference coordinate frame. | |
| Matrix | getDeviceBonePoseMatrix (int bone, bool withController) |
| Device bone pose matrix relative to parent reference coordinate frame. | |
| int | getDeviceFaceExpressionCount () |
| Count of device face expressions. | |
| float | getDeviceFaceExpressionAt (int index) |
| Device face expression. | |
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.
References getFeedbackCount().
Referenced by getDeviceBonePoseMatrix(), and getDeviceFaceExpressionAt().
| 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.
References getComponentCount().
| 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.
References getButtonAt(), and getButtonCount().
Referenced by getDeviceBonePoseCount(), and getDeviceFaceExpressionAt().
| 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.
References getFeedbackAt().
| InputDeviceAxis Dragengine.InputDevice.getAxisAt | ( | int | index | ) |
Get wrapper for axis.
| EOutOfBoundary | index is less than 0 or larger than or equal to getAxisCount(). |
Referenced by getComponentAt().
| int Dragengine.InputDevice.getAxisCount | ( | ) |
| Rig Dragengine.InputDevice.getBodyRig | ( | ) |
Body rig if InputDeviceBoneConfiguration#upperBody or InputDeviceBoneConfiguration#fullBody is used.
References getBoneConfiguration().
Referenced by getVRModel().
| InputDeviceBoneConfiguration Dragengine.InputDevice.getBoneConfiguration | ( | ) |
Device bone configuration.
References getLargestDisplayIconX().
Referenced by getBodyRig().
| InputDeviceButton Dragengine.InputDevice.getButtonAt | ( | int | index | ) |
Get wrapper for button.
| EOutOfBoundary | index is less than 0 or larger than or equal to getButtonCount(). |
References getVRSkin().
Referenced by buttonMatchingKeyCode().
| int Dragengine.InputDevice.getButtonCount | ( | ) |
| InputDeviceComponent Dragengine.InputDevice.getComponentAt | ( | int | index | ) |
Get wrapper for component.
| EOutOfBoundary | index is less than 0 or larger than or equal to getComponentCount(). |
References getAxisAt(), and getAxisCount().
Referenced by getDevicePoseLinearVelocity().
| int Dragengine.InputDevice.getComponentCount | ( | ) |
| int Dragengine.InputDevice.getDeviceBonePoseCount | ( | ) |
Count of device bone pose positions.
References buttonMatchingKeyCode().
Referenced by getDeviceFaceExpressionAt().
| 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. |
References buttonMatchingKeyChar().
Referenced by getDeviceFaceExpressionAt().
| 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. |
Referenced by getDeviceFaceExpressionAt().
| 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. |
Referenced by getDeviceFaceExpressionAt().
| float Dragengine.InputDevice.getDeviceFaceExpressionAt | ( | int | index | ) |
Device face expression.
| index | Index of face expression. Use InputDeviceFaceExpression constants. |
References buttonMatchingKeyChar(), buttonMatchingKeyCode(), getDeviceBonePoseCount(), getDeviceBonePoseMatrix(), getDeviceBonePoseOrientation(), getDeviceBonePosePosition(), getDeviceFaceExpressionAt(), getDeviceFaceExpressionCount(), getDevicePoseAngularVelocity(), getDevicePoseLinearVelocity(), getDevicePoseMatrix(), getDevicePoseOrientation(), and getDevicePosePosition().
Referenced by getDeviceFaceExpressionAt().
| int Dragengine.InputDevice.getDeviceFaceExpressionCount | ( | ) |
Count of device face expressions.
Referenced by getDeviceFaceExpressionAt().
| Vector Dragengine.InputDevice.getDevicePoseAngularVelocity | ( | ) |
Device pose angular velocity relative to tracking reference coordinate frame.
Referenced by getDeviceFaceExpressionAt().
| Vector Dragengine.InputDevice.getDevicePoseLinearVelocity | ( | ) |
Device pose linear velocity relative to tracking reference coordinate frame.
References getComponentAt().
Referenced by getDeviceFaceExpressionAt().
| Matrix Dragengine.InputDevice.getDevicePoseMatrix | ( | ) |
Device pose matrix relative to tracking reference coordinate frame.
Referenced by getDeviceFaceExpressionAt().
| Quaternion Dragengine.InputDevice.getDevicePoseOrientation | ( | ) |
Device pose orientation relative to tracking reference coordinate frame.
Referenced by getDeviceFaceExpressionAt().
| Vector Dragengine.InputDevice.getDevicePosePosition | ( | ) |
Device pose position relative to tracking reference coordinate frame.
Referenced by getDeviceFaceExpressionAt().
| 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.
References getDisplayImage().
Referenced by getDisplayText().
| int Dragengine.InputDevice.getDisplayIconCount | ( | ) |
Count of icons representing the device in bindings.
References getDisplaySkin().
Referenced by getLargestDisplayIconX().
| 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.
References getDisplayModel().
Referenced by getDisplayIconAt().
| Model Dragengine.InputDevice.getDisplayModel | ( | ) |
Model to represent the device in 3D user interfaces or null if not set.
References getName().
Referenced by getDisplayImage().
| Skin Dragengine.InputDevice.getDisplaySkin | ( | ) |
Skin for display model or null if not set.
References getType().
Referenced by getDisplayIconCount().
| String Dragengine.InputDevice.getDisplayText | ( | ) |
Text to display centered across display image or icon.
References getDisplayIconAt().
Referenced by getHandRig().
| InputDeviceFeedback Dragengine.InputDevice.getFeedbackAt | ( | int | index | ) |
Get wrapper for feedback.
| EOutOfBoundary | index is less than 0 or larger than or equal to getFeedbackCount(). |
Referenced by buttonMatchingKeyCode().
| int Dragengine.InputDevice.getFeedbackCount | ( | ) |
| 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.
References getLargestDisplayIconY().
Referenced by getSupportsFaceMouthExpressions().
| Rig Dragengine.InputDevice.getHandRig | ( | ) |
Hand rig if InputDeviceBoneConfiguration#hand is used.
References getDisplayText().
Referenced by getUsingHandInteraction().
| 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.
References getID().
Referenced by getID().
| int Dragengine.InputDevice.getIndex | ( | ) |
| 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.
References getDisplayIconCount().
Referenced by getBoneConfiguration().
| 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.
Referenced by getFingerTipOffset().
| 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.
Referenced by getDisplayModel().
| InputEventSource Dragengine.InputDevice.getSource | ( | ) |
System owning the device.
Device index is only valid for the matching system.
References getSource().
Referenced by getSource().
| bool Dragengine.InputDevice.getSupportsFaceEyeExpressions | ( | ) |
| bool Dragengine.InputDevice.getSupportsFaceMouthExpressions | ( | ) |
Device supports face mouth expressions.
References getFingerTipOffset().
Referenced by getVRTrackerRole().
| InputDeviceType Dragengine.InputDevice.getType | ( | ) |
Device type.
Referenced by getDisplaySkin().
| bool Dragengine.InputDevice.getUsingHandInteraction | ( | ) |
Device is using hand interaction.
Used for devices of type InputDeviceType#vrRightHand or InputDeviceType#vrLeftHand. If true the device is representing hand interaction with no controller held in hand. Typically applications should use different aiming, pointing and input behavior.
References getHandRig().
Referenced by getAxisCount().
| Model Dragengine.InputDevice.getVRModel | ( | ) |
Model to represent the device in VR environments or null if not set.
References getBodyRig().
Referenced by getButtonCount().
| Skin Dragengine.InputDevice.getVRSkin | ( | ) |
| InputDeviceVRTrackerRole Dragengine.InputDevice.getVRTrackerRole | ( | ) |
VR tracker role.
References getSupportsFaceEyeExpressions(), and getSupportsFaceMouthExpressions().
Referenced by getFeedbackCount().
| 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.
Referenced by getComponentCount().