-
大小: 2.28MB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2023-09-05
- 語言: 其他
- 標簽: Leapmotion??leap??手勢控制??
資源簡介
LeapMotion官方開發(fā)翻譯文檔,2014的開發(fā)文檔,有相關(guān)開發(fā)的可以參考。

代碼片段和文件信息
/******************************************************************************\
*?Copyright?(C)?2012-2014?Leap?Motion?Inc.?All?rights?reserved.???????????????*
*?Leap?Motion?proprietary?and?confidential.?Not?for?distribution.??????????????*
*?Use?subject?to?the?terms?of?the?Leap?Motion?SDK?Agreement?available?at???????*
*?https://developer.leapmotion.com/sdk_agreement?or?another?agreement?????????*
*?between?Leap?Motion?and?you?your?company?or?other?organization.?????????????*
\******************************************************************************/
#include?
#include?
#include?“Leap.h“
using?namespace?Leap;
class?SampleListener?:?public?Listener?{
??public:
????virtual?void?onInit(const?Controller&);
????virtual?void?onConnect(const?Controller&);
????virtual?void?onDisconnect(const?Controller&);
????virtual?void?onExit(const?Controller&);
????virtual?void?onframe(const?Controller&);
????virtual?void?onfocusGained(const?Controller&);
????virtual?void?onfocusLost(const?Controller&);
????virtual?void?onDeviceChange(const?Controller&);
????virtual?void?onServiceConnect(const?Controller&);
????virtual?void?onServiceDisconnect(const?Controller&);
??private:
};
const?std::string?fingerNames[]?=?{“Thumb“?“Index“?“Middle“?“Ring“?“Pinky“};
const?std::string?boneNames[]?=?{“metacarpal“?“Proximal“?“Middle“?“Distal“};
const?std::string?stateNames[]?=?{“STATE_INVALID“?“STATE_START“?“STATE_UPDATE“?“STATE_END“};
void?SampleListener::onInit(const?Controller&?controller)?{
??std::cout?<“Initialized“?<}
void?SampleListener::onConnect(const?Controller&?controller)?{
??std::cout?<“Connected“?<??controller.enableGesture(Gesture::TYPE_CIRCLE);
??controller.enableGesture(Gesture::TYPE_KEY_TAP);
??controller.enableGesture(Gesture::TYPE_SCREEN_TAP);
??controller.enableGesture(Gesture::TYPE_SWIPE);
}
void?SampleListener::onDisconnect(const?Controller&?controller)?{
??//?Note:?not?dispatched?when?running?in?a?debugger.
??std::cout?<“Disconnected“?<}
void?SampleListener::onExit(const?Controller&?controller)?{
??std::cout?<“Exited“?<}
void?SampleListener::onframe(const?Controller&?controller)?{
??//?Get?the?most?recent?frame?and?report?some?basic?information
??const?frame?frame?=?controller.frame();
??std::cout?<“frame?id:?“?<ame.id()
????????????<“?timestamp:?“?<ame.timestamp()
????????????<“?hands:?“?<ame.hands().count()
????????????<“?fingers:?“?<ame.fingers().count()
????????????<“?tools:?“?<ame.tools().count()
????????????<“?gestures:?“?<ame.gestures().count()?<
??HandList?hands?=?frame.hands();
??for?(HandList::const_iterator?hl?=?hands.begin();?hl?!=?hands.end();?++hl)?{
????//?Get?the?first?hand
????const?Hand?hand?=?*hl;
????std::string?handType?=?hand.isLeft()???“Left?hand“?:?“Right?hand“;
????std::cout?<??????????????<“?palm?position:?“?<
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-12-10?23:24??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\
?????文件?????1511440??2014-12-10?23:22??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[中文]Leap?Motion官方開發(fā)文檔?DOCX版本.docx
?????文件?????1002218??2014-12-10?23:22??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[中文]Leap?Motion官方開發(fā)文檔?PDF版本.pdf
?????目錄???????????0??2014-12-10?23:23??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\
?????文件????????3476??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\JSONViewer.html
?????文件????????8895??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\Sample.cpp
?????文件????????6724??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\Sample.cs
?????文件???????10388??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\Sample.html
?????文件????????7848??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\Sample.java
?????文件????????6705??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\Sample.py
?????文件????????1213??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\SampleVS2008.sln
?????文件????????6975??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\SampleVS2008.vcproj
?????文件????????1212??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\SampleVS2010.sln
?????文件????????9510??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\SampleVS2010.vcxproj
?????文件????????1212??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\SampleVS2012.sln
?????文件????????9679??2014-11-20?11:25??[2014-12-10]?Leap?Motion官方開發(fā)文檔翻譯\[英文]Leap?Motion官方開發(fā)文檔?HTML版本\SampleVS2012.vcxproj
- 上一篇:stm32基本例程 PWM輸出實驗
- 下一篇:STC-ISP Ver6.38軟件
評論
共有 條評論