This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Plugins::LeapMotion::Finger Struct

Header: #include <UnigineLeapMotion.h>
Notice
LeapMotion plugin must be loaded.

This structure represents a finger of a hand. All coordinates are relative to the origin of the Leap Motion coordinate system.

The Finger structure is declared as follows:

Source code (C++)
struct Finger
{
	int id;
	int type;
	float length;
	float width;
	int is_extended;
	int is_valid;
	Unigine::Math::vec3 tip_position;
	Unigine::Math::vec3 tip_velocity;
	Unigine::Math::vec3 direction;
	Unigine::Math::vec3 stabilized_tip_position;

	Bone bones[Bone::BONE_NUM_TYPES];
};

Elements of the array of bones of the finger can be accessed using Bone::TYPE_* values as indices.

LeapMotionFinger Class

Enums

TYPE#

NameDescription
Finger::TYPE_THUMB = 0Thumb.
Finger::TYPE_INDEX = 1Index finger.
Finger::TYPE_MIDDLE = 2Middle finger.
Finger::TYPE_RING = 3Ring finger.
Finger::TYPE_PINKY = 4Pinky finger.
Finger::FINGER_NUM_TYPES = Total number of finger types.

Members


int getType ( ) #

Returns the type of the finger.

Return value

Finger type. One of the Finger::TYPE_* values.

int getID ( ) #

Returns the ID of the finger.
Notice
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.
Notice
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.
Notice
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.
Notice
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.
Notice
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: 2022-10-10
Build: ()