LeapMotionFinger Class
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
LeapMotion plugin must be loaded.
This class represents a finger of a hand. All coordinates are relative to the origin of the Leap Motion coordinate system.
LeapMotionFinger Class
Members
int getType ( ) #
Returns the type of the finger.Return value
Finger type. One of the LEAP_MOTION_TYPE_* values.int getId ( ) #
Returns the ID of the finger.Finger IDs are assigned based on the hand ID. If a hand has an ID of "5", then its fingers are assigned IDs 50 to 55, ordered from thumb to pinky.
Return value
Finger ID.float getLength ( ) #
Returns the length of the finger, in meters.Return value
Length of the finger, in meters.float getWidth ( ) #
Returns the width of the finger, in meters.Return value
Width of the finger, in meters.vec3 getTipPosition ( ) #
Returns the coordinates of the instantaneous position of the finger tip.All coordinates are relative to the origin of the Leap Motion coordinate system.
Return value
Coordinates of the instantaneous position of the finger tip.vec3 getStabilizedTipPosition ( ) #
Returns the coordinates of the finger tip position filtered and stabilized using velocity and past positions.All coordinates are relative to the origin of the Leap Motion coordinate system.
Return value
Coordinates of the finger tip position filtered and stabilized using velocity and past positions.vec3 getTipVelocity ( ) #
Returns the instantaneous velocity of the finger tip, in m/s.All coordinates are relative to the origin of the Leap Motion coordinate system.
Return value
Instantaneous velocity of the finger tip, in m/s.vec3 getDirection ( ) #
Returns the current pointing direction vector of the finger.All coordinates are relative to the origin of the Leap Motion coordinate system.
Return value
Current pointing direction vector of the finger.int isExtended ( ) #
Returns a value indicating if the finger is extended.Return value
1 if the finger is extended; otherwise, 0.int isValid ( ) #
Returns a value indicating if the finger contains valid tracking data.Return value
1 if the finger contains valid tracking data; otherwise, 0.Last update:
2020-07-31
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)