Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

readme..

  • Loading branch information...
commit f404b8d3cf879ebdcd3801c302ded2236418f8d0 1 parent 05619be
Roy Shilkrot authored
Showing with 14 additions and 2 deletions.
  1. +4 −0 README.md
  2. +10 −2 webkit-plugin-mac/HandMessageListener.h
View
4 README.md
@@ -23,6 +23,10 @@ Event handlers in the browser extension may be placed globally, in content scrip
FLOW DIAGRAM:
Kinect =====> Browser plugin/native code =====> Browser extension ===(Javascript+DOM events)==> Any web page
+Note: As of now we are using OpenNI/NITE for tracking and gesture rec. Download the precompiled libs from:
+http://www.openni.org/downloadfiles/opennimodules/openni-binaries/21-stable
+http://www.openni.org/downloadfiles/opennimodules/openni-compliant-middleware-binaries/34-stable
+
Platforms
---------
Right now we only support Macs. All dependencies are statically compiled and in the repo.
View
12 webkit-plugin-mac/HandMessageListener.h
@@ -33,11 +33,11 @@ class HandPointControl : public XnVPointControl {
// m_pInnerFlowRouter = new XnVFlowRouter;
m_pPushDetector = new XnVPushDetector;
m_pSwipeDetector = new XnVSwipeDetector;
- m_pSwipeDetector->SetMotionSpeedThreshold(0.8);
+ m_pSwipeDetector->SetMotionSpeedThreshold(0.8); //swipes should be faster then regular movement
// m_pSteadyDetector = new XnVSteadyDetector;
// m_pWaveDetector = new XnVWaveDetector;
m_pCircleDetector = new XnVCircleDetector;
- m_pCircleDetector->SetMinRadius(80);
+ m_pCircleDetector->SetMinRadius(80); //circles should be big enough to prevent confusion with random movement
// m_pInnerFlowRouter->SetActive(m_pPushDetector);
@@ -51,6 +51,8 @@ class HandPointControl : public XnVPointControl {
//m_pWaveDetector->RegisterWave(this, &Wave_Waved);
m_pSwipeDetector->RegisterSwipeLeft(this, &Swipe_Left);
m_pSwipeDetector->RegisterSwipeRight(this, &Swipe_Right);
+ m_pSwipeDetector->RegisterSwipeUp(this, &Swipe_Up);
+ m_pSwipeDetector->RegisterSwipeDown(this, &Swipe_Down);
}
void Update(XnVMessage* pMessage)
@@ -69,6 +71,12 @@ class HandPointControl : public XnVPointControl {
static void XN_CALLBACK_TYPE Swipe_Right(XnFloat fVelocity, XnFloat fAngle, void* pUserCxt) {
send_event("SwipeRight", "");
}
+ static void XN_CALLBACK_TYPE Swipe_Up(XnFloat fVelocity, XnFloat fAngle, void* pUserCxt) {
+ send_event("SwipeUp", "");
+ }
+ static void XN_CALLBACK_TYPE Swipe_Down(XnFloat fVelocity, XnFloat fAngle, void* pUserCxt) {
+ send_event("SwipeDown", "");
+ }
// Push detector
static void XN_CALLBACK_TYPE Push_Pushed(XnFloat fVelocity, XnFloat fAngle, void* cxt)
Please sign in to comment.
Something went wrong with that request. Please try again.