LeapMotion v2 中文文档
  • Introduction
  • 语言
    • Introduction
    • C++
      • 文档概述(v2.3)
      • 骨骼追踪模型概述
      • API 综述
      • 设计指南
        • 菜单设计指南
        • 用户导向与教程设计指南
        • 应用展示与营销指南
        • 用户体验设计指南
      • 应用程序开发
        • SDK 库
        • 快速入门
        • 项目设置
        • 系统架构
        • 运行时配置
        • 控制器策略
      • 使用追踪 API
        • 连接到控制器
        • 追踪模型
        • 帧
        • 手
        • 手指
        • 手势
        • 触摸仿真
        • 运动
        • 坐标系统
        • 相机图像
        • 序列化追踪数据
      • API 参考
        • Arm
        • Bone
        • CircleGesture
        • Config
        • Controller
        • Device
        • DeviceList
        • FailedDevice
        • FailedDeviceList
        • Finger
        • FingerList
        • Frame
        • Gesture
        • GestureList
        • Hand
        • HandList
        • Image
        • ImageList
        • InteractionBox
        • KeyTapGesture
        • Listener
        • Matrix
        • Pointable
        • PointableList
        • ScreenTapGesture
        • SwipeGesture
        • Tool
        • ToolList
        • Vector
      • 附录
        • Leap Motion Release Notes
        • 使用 LeapMotion 控制面板
        • 使用可视化诊断工具
        • WebSocket 通信
        • 鸣谢
    • Objective-C
      • 文档概述(v2.3)
      • 骨骼追踪模型概述
      • API 综述
      • 设计指南
        • 菜单设计指南
        • 用户导向与教程设计指南
        • 应用展示与营销指南
        • 用户体验设计指南
      • 应用程序开发
        • SDK 库
        • 快速入门
        • 项目设置
        • 系统架构
        • 运行时配置
      • 使用追踪 API
        • 连接到控制器
        • 追踪模型
        • 帧
        • 手
        • 手指
        • 手势
        • 触摸仿真
        • 运动
        • 坐标系统
        • 相机图像
        • 序列化追踪数据
      • API 参考
        • LeapArm
        • LeapBone
        • LeapCircleGesture
        • LeapConfig
        • LeapController
        • LeapDelegate
        • LeapDevice
        • DeviceList
        • LeapFinger
        • FingerList
        • LeapFrame
        • LeapGesture
        • GestureList
        • LeapHand
        • LeapImage
        • ImageList
        • LeapInteractionBox
        • LeapKeyTapGesture
        • LeapListener Protocol
        • LeapMatrix
        • LeapPointable
        • LeapPointableList
        • LeapPointableOrHandList
        • Category
        • LeapScreenTapGesture
        • LeapSwipeGesture
        • LeapTool
        • LeapVector
      • 附录
        • Leap Motion Release Notes
        • 使用 LeapMotion 控制面板
        • 使用可视化诊断工具
        • WebSocket 通信
        • 鸣谢
    • Python
      • 文档概述(v2.3)
      • 骨骼追踪模型概述
      • API 综述
      • 设计指南
        • 菜单设计指南
        • 用户导向与教程设计指南
        • 应用展示与营销指南
        • 用户体验设计指南
      • 应用程序开发
        • SDK 库
        • 快速入门
        • 项目设置
        • 系统架构
        • 运行时配置
      • 使用追踪 API
        • 连接到控制器
        • 追踪模型
        • 帧
        • 手
        • 手指
        • 手势
        • 触摸仿真
        • 运动
        • 坐标系统
        • 相机图像
        • 序列化追踪数据
      • API 参考
        • Arm
        • Bone
        • CircleGesture
        • Config
        • Controller
        • Device
        • DeviceList
        • Finger
        • FingerList
        • Frame
        • Gesture
        • GestureList
        • Hand
        • HandList
        • Image
        • ImageList
        • InteractionBox
        • KeyTapGesture
        • Listener
        • Matrix
        • Pointable
        • PointableList
        • ScreenTapGesture
        • SwipeGesture
        • Tool
        • ToolList
        • Vector
    • JavaScript
      • 文档概述(v2.3)
      • 骨骼追踪模型概述
      • API 综述
      • 设计指南
        • 菜单设计指南
        • 用户导向与教程设计指南
        • 应用展示与营销指南
        • 用户体验设计指南
      • 应用程序开发
        • SDK 库
        • 快速入门
        • 项目设置
        • 系统架构
        • 运行时配置
      • 使用追踪 API
        • 连接到控制器
        • 追踪模型
        • 帧
        • 手
        • 手指
        • 手势
        • 触摸仿真
        • 运动
        • 坐标系统
        • 相机图像
        • 序列化追踪数据
      • LeapJS 插件
      • API 参考
        • Leap namespace
        • Bone
        • CircleGesture
        • Controller
        • Finger
        • Frame
        • Gesture
        • Hand
        • InteractionBox
        • KeyTapGesture
        • Pointable
        • ScreenTapGesture
        • SwipeGesture
        • Matrix
        • Vector
      • 附录
        • Leap Motion Release Notes
        • 使用 LeapMotion 控制面板
        • 使用可视化诊断工具
        • WebSocket 通信
        • 鸣谢
Powered by GitBook
On this page
  • Frame
  • Hand
  • Arm
  • Pointable、Finger、Tool
  • Bone
  • Gesture
  • Image
  • 追踪目标的列表
  • 工具类

Was this helpful?

  1. 语言
  2. JavaScript
  3. 使用追踪 API

追踪模型

Previous连接到控制器Next帧

Last updated 5 years ago

Was this helpful?

LeapMotion API 定义了一系列类来表示每个主要的追踪对象。

Frame 是数据模型的基础,提供所有追踪对象实体的访问。每隔一个时间间隔都会创建一个新的 Frame。

帧包含了手、手指、工具以及在当前帧追踪的手势的列表。(你还可以从 Hand 对象关联的特定手中获取手指。)

Hand 对象描述了一只手的位置和方向。通过在帧和包含那只手所关联的手指的列表之间追踪它的动作。

# 手是一个 Leap.Hand 对象
pointables = hand.pointables
fingers = hand.fingers

Arm 对象描述了一只手所附加的手臂的位置和方向。手臂只能通过 Hand 对象来访问。

Pointable 对象为手指和工具定义了基本特征。Finger 和 Tool 类从 Pointable 类扩展而来,为这些实体增加了特定的信息。

if (pointable.is_tool):
    tool = Leap.Tool(pointable)
else:
    finger = Leap.Finger(pointable)

Bone 对象表示骨头的位置和方向。被追踪的骨头包括手指的 Metarcapals 和 Phalanges 骨。

Gesture 类和他的子类表示了 LeapMotion 软件所能识别的四中不同的手势。

Image 对象提供了 LeapMotion 摄像头的原始传感器数据以及一个校准镜头畸变的网络(不能通过 WebSocket 服务获取)。

追踪目标的列表

帧和手对象以及其他追踪物体的列表。

工具类

、、

、、 以及 提供了一些便捷的函数和列表成员过滤器。例如,frontmost()函数返回的是 LeapMotion 控制器视野中最前面放的物体(z 轴值最小的物体)。

类描述了点和方向,Vector 类还提供了一些有用的数学函数用来处理向量。

同样, 类描述了类似旋转的变换,通过一些 API 函数来返回。

类帮助LeapMotion 控制器视野的一部分直线映射到二维屏幕空间或者三维空间。参考。

Hand
Arm
Pointable
Finger
Tool
Bone
Gesture
Image
HandList
PointableList
FingerList
ToolList
Vector
Matrix
InteractionBox
模拟触摸
Frame