HandList类(Leap:: HandList)
2015-09-20 21:45
381 查看
HandList类(Leap:: HandList)
这个类代表了Hand对象的列表。通过调用Frame:: hands()可以得到一个HandList对象。Leap:: HandList allHands = frame.hands();
HandList & append(const HandList & other): 表示把指定的一个HandList的成员添加到这个HandList对象中。参数other表示一个HandList对象,其中包含Hand对象,将要添加到这个HandList对象末端。
const_iterator begin(): 表示C++的迭代器,设置在这个HandList对象的开始。
用法:Leap:: HandList hands = frame.hands();
for (Leap:: HandList::const_iterator hl = hands.begin(); hl != hands.end(); hl++)
std::cout << *hl << std::endl;
int count(): 表示这个列表中手的数目。
const_iterator end(): 表示C++的迭代器,设置在这个HandList对象的结束。
用法:Leap:: HandList hands = frame.hands();
for (Leap:: HandList::const_iterator hl = hands.begin(); hl != hands.end(); hl++)
std::cout << *hl << std::endl;
Hand frontmost(): 表示在Leap Motion参照系下这个列表中最靠前的成员(也就是z值最小)。
用法:Leap::Hand FrontHand=frame. hands().frontmost();
HandList(): 表示构造一个没有实体的空列表。
bool isEmpty(): 判断这个列表是否为空。如果没有成员,返回True。
Hand leftmost(): 表示在Leap Motion参照系下这个列表中最靠左的成员(也就是x值最小)。
用法:Leap::Hand furthestleft=frame. hands().leftmost();
Hand operator[](int index): 表示对列表中一个成员位置的访问。返回的是指定索引下的Hand对象。
用法:Leap::Hand firstInList=frame.hands()[0];
Hand rightmost(): 表示在Leap Motion参照系下这个列表中最靠右的成员(也就是x值最大)。
用法:Leap::Hand furthestright=frame. hands().rightmost();
引自:https://developer.leapmotion.com/documentation/cpp/api/Leap.HandList.html
相关文章推荐
- 类修饰符的含义 成员变量修饰符 成员方法修饰符的含义
- Java过滤器与SpringMVC拦截器之间的关系与区别
- PCB-从零开始
- css
- java集合类
- ViewPager的缓存机制
- *LeetCode-Minimum Path Sum
- 杭电2897邂逅明下邂逅明下
- ios-新浪微博开发20-控制器的切换
- sh_gamit 快速星历错误
- 45-90秒掌握10本最畅销创业书籍干货精华!(一)
- 八位 UUID
- ad15 各个层的含义
- get a new level 25 battle pet in about an hour
- 剑指offer | 从尾到头打印链表
- STL容器
- SQL localdb 连接字符串
- MinGW环境变量设置、CodeBlock添加额外的库
- Git常用命令
- 沈航组成原理作业——1