25 #ifndef S_LEAPMOTION_H 26 #define S_LEAPMOTION_H 28 #include <scolPlugin.h> 29 #include <boost/thread/thread.hpp> 30 #include <boost/bind.hpp> 53 std::vector<Vector> subVecs;
63 svec = Vector(0.0f, 0.0f, 0.0f);
64 evec = Vector(0.0f, 0.0f, 0.0f);
65 screenPos = Vector(0.0f, 0.0f, 0.0f);
66 pyr = Vector(0.0f, 0.0f, 0.0f);
67 vDir = Vector(0.0f, 0.0f, 0.0f);
94 SGesture(
int nid,
int nhandid,
int npointableid)
98 pointableId = npointableid;
122 std::vector<std::vector<int> > mLastPointableIds;
123 std::vector<int> mLastHandIds;
124 std::vector<int> mLastToolsIds;
125 int mLastGestureTick;
126 std::vector<SGesture> mGestureList;
128 Controller mController;
141 virtual void onInit(
const Controller&);
142 virtual void onConnect(
const Controller&);
143 virtual void onDisconnect(
const Controller&);
144 virtual void onExit(
const Controller&);
145 virtual void onFrame(
const Controller&);
146 virtual void onFocusGained(
const Controller&);
147 virtual void onFocusLost(
const Controller&);
149 bool GetHand(
int id, Hand &hand);
150 bool GetLeftHand(Hand &hand);
151 bool GetRightHand(Hand &hand);
152 bool GetHandPosition(
const Hand hand,
bool optim, Vector &vec);
153 bool GetHandOrientation(
const Hand hand, Vector &vec);
154 bool GetHandDirection(
const Hand hand, Vector &vec);
155 bool GetHandPalmNormal(
const Hand hand, Vector &vec);
156 bool GetHandVelocity(
const Hand hand, Vector &vec);
157 std::vector<SCbData> GetHandFingers(
const Hand hand,
bool optim =
false);
159 bool GetTool(
int id, Tool &tool);
160 bool GetToolPosition(
const Tool tool,
bool optim, Vector &vec);
161 bool GetToolOrientation(
const Tool tool, Vector &vec);
162 bool GetToolVelocity(
const Tool tool, Vector &vec);
164 void DetectHands(
const HandList hands);
165 void DetectFingers(
const Hand hand);
166 void DetectTools(
const ToolList tools);
167 void DetectGestures(
const GestureList gestures);
169 void SetTopTrackingEnable(
bool state);
170 bool GetTopTrackingEnable();