• Leap::HandList Class Reference 手列表类参考


    摘要: 简要说明(由于本人英语水平真的很烂,文里漏洞百出,欢迎批评指正)

    点击查看原文

    手对象的列表。

    继承 Leap::Interface

    公有类型

    typedef ConstListIterator<HandList Hand>  const_iterator

                           手列表对象的一个C++迭代器


    公有成员函数

         HandLisy&      append (const HandList &other)

                            添加一个指定的手列表对象中的成员到这个手列表中

    const_iterator      begin () const

                             C++迭代器设置到手列表的开头

                  int        count () const

                             返回手列表中对象的数目

    const_iterator      end () const
                             C++迭代器设置到手列表的结尾

               Hand       frontmost () const

                             列表中在Leap Motion坐标系内和前方距离最远的成员(也就是具有最小的Z坐标)

                            HandList ()

                            构造一个空的手列表

               bool       isEmpty () const

                           判断这个列表是否为空

              Hand       leftmost () const

                             列表中在Leap Motion坐标系内和左方距离最远的成员(也就是具有最小的X坐标)

              Hand        operator[] (int index) const

                           通过成员在列表中的位置来访问它

              Hand       rightmost () const

                            列表中在Leap Motion坐标系内和右方距离最远的成员(也就是具有最大的X坐标)


    详细描述

    手列表类表示了手对象的列表。

    通过调用Frame::hands()函数来获得手列表对象。

    HandList allHands = frame.hands();

    Since

    1.0


     成员类型文档

     typedef ConstListIterator<HandList, Hand> Leap::HandList::const_iterator

     HandList对象的一个C++迭代器类型

    for(HandList::const_iterator hl = frame.hands().begin(); hl != frame.hands().end();)
        std::cout << *hl << std::endl;

    Since

    1.0


    构造函数和析构函数文档

    Leap::HandList::HandList()

    构造一个空的HandList对象

    Since

    1.0


     成员函数文档

     HandList& Leap::HandList::append(const HandList other)

     添加一个指定的手列表对象中的成员到这个手列表中

    参数:

    other 要被添加到这个 HandList对象中的包含所有手对象的另一个HandList对象。

    const_iterator Leap::HandList::begin()const

    C++迭代器设置到手列表的开头

    for(HandList::const_iterator hl = frame.hands().begin(); hl != frame.hands().end();)
        std::cout << *hl << std::endl;

    Since

    1.0

     int Leap::HandList::count()const

     返回手列表中对象的数目

    if (frame.hands().count() > 0) {
        //Process hand data...
    }

    返回:

    列表中手对象的数目

     Since

    1.0

    const_iterator Leap::HandList::end()const

    C++迭代器设置到手列表的结尾

    for(HandList::const_iterator hl = frame.hands().begin(); hl != frame.hands().end();)
        std::cout << *hl << std::endl;

    Since

    1.0

    Hand Leap::HandList::frontmost()const

    列表中在Leap Motion坐标系内和前方距离最远的成员(也就是具有最小的Z坐标)

    Hand frontHand = frame.hands().frontmost();

    返回:

    最前面的手,或者如果列表是空的则返回无效对象。

    Since

    1.0

    bool Leap::HandList::isEmpty()const

    判断这个列表是否为空.

    if (!frame.hands().isEmpty()) {
        //Process hands...
    }

    返回:

    True,如果列表中没有成员。

    Since

    1.0

    Hand Leap::HandList::leftmost()const

    列表中在Leap Motion坐标系内和左方距离最远的成员(也就是具有最小的X坐标).

    Hand furthestLeft = frame.hands().leftmost();

    返回:

    最左边的手,或者如果列表是空的则返回无效对象。

    Since

    1.0

    Hand Leap::HandList::operator[](int index)const

    通过成员在列表中的位置来访问它。

    Hand firstInList = frame.hands()[0];

    参数:

    index 从0开始计算的列表中的位置索引

    返回:

    特定位置上的手对象

    Since

    1.0

    Hand Leap::HandList::rightmost()const

    列表中在Leap Motion坐标系内和右方距离最远的成员(也就是具有最大的X坐标).

    Hand furthestRight = frame.hands().rightmost();

    返回:

    最右边的手,或者如果列表是空的则返回无效对象。

    Since

    1.0

  • 相关阅读:
    C# 16进制与字符串、字节数组之间的转换
    多文件上传方法
    超链接如何下载文件txt,word,excel等等
    asp.net不同类型文件读取处理
    .net二进制图片存储与读取的常见方法
    c#事务
    C#中的null和数据库中的null的区别
    Asp.net中Response.Charset 与Response.ContentEncoding区别
    导出到word
    js导出word
  • 原文地址:https://www.cnblogs.com/zsclucien/p/3387503.html
Copyright © 2020-2023  润新知