Skip to content

Commit

Permalink
Updated drivers to openNI/NITE/SensorKinect latest unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Gingold committed Jan 9, 2012
1 parent eef6e4e commit 7e289c7
Show file tree
Hide file tree
Showing 168 changed files with 1,834 additions and 1,318 deletions.
Binary file modified .DS_Store
Binary file not shown.
Empty file modified include/libusb/libusb.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnCommon.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnV3DVector.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVActivationMessage.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVBroadcaster.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVCCMessage.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVCircle.h 100644 → 100755
Empty file.
10 changes: 5 additions & 5 deletions include/nite/XnVCircleDetector.h 100644 → 100755
Expand Up @@ -16,6 +16,9 @@
class XnVPointBuffer;
class XnVCircleSolver;

class XnVNoCircleSpecificEvent;
class XnVCircleSpecificEvent;

/**
* Identify a circle. This is done by starting from a single point, and finding points going further away,
* then back closer. A best fitting circle is found, and makes sure it really is a circle - there are points in all
Expand Down Expand Up @@ -213,9 +216,6 @@ class XNV_NITE_API XnVCircleDetector :
XnStatus GetMaxErrors(XnUInt32& nMaxErrors) const;

protected:
XN_DECLARE_EVENT_2ARG(XnVNoCircleSpecificEvent, XnVNoCircleEvent, XnFloat, fValue, XnVNoCircleReason, eReason);
XN_DECLARE_EVENT_3ARG(XnVCircleSpecificEvent, XnVCircleEvent, XnFloat, fTimes, XnBool, bConfidence, const XnVCircle*, pCircle);

void AddPoint(const XnPoint3D& pt, XnFloat fTime);

XnVCircleSolver* m_pCircleSolver;
Expand Down Expand Up @@ -245,8 +245,8 @@ class XNV_NITE_API XnVCircleDetector :

XnVPointBuffer* m_pMovementDetectionBuffer;

XnVCircleSpecificEvent m_CircleCBs;
XnVNoCircleSpecificEvent m_NoCircleCBs;
XnVCircleSpecificEvent* m_pCircleCBs;
XnVNoCircleSpecificEvent* m_pNoCircleCBs;
};

#endif // _XNV_CIRCLE_DETECTOR_H_
13 changes: 7 additions & 6 deletions include/nite/XnVClickableVirtualPlane.h 100644 → 100755
Expand Up @@ -12,6 +12,10 @@
#include "XnVVirtualCoordinates.h"

class XnVClickableVirtualPlane;
class XnVIntPointHash;
class XnVIntIDHash;
class XnVUintPointSpecificEvent;

struct XnVClickableID
{
XnVClickableID(const XnVHandPointContext* cxt, XnVClickableVirtualPlane* pPlane) :
Expand Down Expand Up @@ -101,15 +105,12 @@ class XNV_NITE_API XnVClickableVirtualPlane :
*/
XnBool IsFrozen(XnUInt32 nID) const;
protected:
XN_DECLARE_DEFAULT_HASH_DECL(XNV_NITE_API, XnUInt32, XnPoint3D*, XnVIntPointHash);
XN_DECLARE_DEFAULT_HASH_DECL(XNV_NITE_API, XnUInt32, XnVClickableID*, XnVIntIDHash);

void UpdateVirtualPoint(XnVVirtualCoordinatesInternal* pVC, const XnVHandPointContext* pContext, XnVHandPointContext* pLocalContext);

XnVIntPointHash m_FrozenPoints;
XnVIntIDHash m_IDContexts;
XnVIntPointHash* m_pFrozenPoints;
XnVIntIDHash* m_pIDContexts;

XnVUintPointSpecificEvent m_ClickCBs;
XnVUintPointSpecificEvent* m_pClickCBs;
};

#endif // _XNV_CLICKABLE_VIRTUAL_PLANE_H_
Empty file modified include/nite/XnVComplexMessage.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDepthControl.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDepthGenerator.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDepthMessage.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDeviceControl.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDeviceFilter.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDeviceGenerator.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDeviceMessage.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVDirection.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVFilter.h 100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions include/nite/XnVFlowRouter.h 100644 → 100755
Expand Up @@ -9,9 +9,10 @@
#ifndef _XNV_FLOW_ROUTER_H_
#define _XNV_FLOW_ROUTER_H_

#include <XnStringsHash.h>
#include "XnVMessageListener.h"

class XnStringsHash;

/**
* A XnVFlowRouter is a Message Listener, that holds another single Listener internally,
* and sends any Message it gets to that Listener.
Expand Down Expand Up @@ -61,7 +62,7 @@ class XNV_NITE_API XnVFlowRouter :
virtual void OpenNewSession();
XnVMessageListener* m_pActive;

XnStringsHash m_Properties; // for last points
XnStringsHash* m_pProperties; // for last points
};

#endif
10 changes: 5 additions & 5 deletions include/nite/XnVGesture.h 100644 → 100755
Expand Up @@ -9,9 +9,11 @@
#ifndef _XNV_GESTURE_H_
#define _XNV_GESTURE_H_
#include <XnOpenNI.h>

#include "XnVDeviceControl.h"

class XnVGestureRecognizeSpecificEvent;
class XnVGestureStartRecognizeSpecificEvent;

/**
* A XnVGesture is a Context Control, which identifies gestures.
*/
Expand Down Expand Up @@ -98,10 +100,8 @@ class XNV_NITE_API XnVGesture :
*/
void UnregisterStartRecognize(XnCallbackHandle hCB);
private:
XN_DECLARE_EVENT_3ARG(XnVGestureRecognizeSpecificEvent, XnVGestureRecognizeEvent, const XnChar*, strGesture, const XnPoint3D&, ptIDPos, const XnPoint3D&, ptEndPos);
XN_DECLARE_EVENT_3ARG(XnVGestureStartRecognizeSpecificEvent, XnVGestureStartRecognizeEvent, const XnChar*, strGesture, const XnPoint3D&, ptPos, XnFloat, fProgress);
XnVGestureStartRecognizeSpecificEvent m_StartRecognizeCBs;
XnVGestureRecognizeSpecificEvent m_RecognizeCBs;
XnVGestureStartRecognizeSpecificEvent* m_pStartRecognizeCBs;
XnVGestureRecognizeSpecificEvent* m_pRecognizeCBs;
};

#endif
Empty file modified include/nite/XnVHandPointContext.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVHandle.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVImageGenerator.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVImageMessage.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVMathCommon.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVMessage.h 100644 → 100755
Empty file.
11 changes: 5 additions & 6 deletions include/nite/XnVMessageGenerator.h 100644 → 100755
Expand Up @@ -9,12 +9,13 @@
#ifndef _XNV_MESSAGE_GENERATOR_H_
#define _XNV_MESSAGE_GENERATOR_H_

#include <XnStringsHash.h>

#include "XnVMessageListener.h"
#include "XnVMessage.h"
#include "XnVHandle.h"

class XnVIntMessageListenerHash;
class XnStringsHash;

/**
* A XnVMessageGenerator knows how to generate messages.
* Message Listeners register to it, and receive its Messages.
Expand Down Expand Up @@ -74,13 +75,11 @@ class XNV_NITE_API XnVMessageGenerator
*/
const XnChar* GetGeneratorName() const;
protected:
XN_DECLARE_DEFAULT_HASH_DECL(XNV_NITE_API, XnUInt32, XnVMessageListener*, XnVIntMessageListenerHash);

void OpenNewSession(XnVMessageListener* pListener);
void CloseOldSession(XnVMessageListener* pListener);

XnVIntMessageListenerHash m_hListeners;
XnStringsHash m_Properties; // for last points
XnVIntMessageListenerHash* m_phListeners;
XnStringsHash* m_pProperties; // for last points
XnVHandle m_hNextAvailable;

XnChar* m_strGeneratorName;
Expand Down
15 changes: 8 additions & 7 deletions include/nite/XnVMessageListener.h 100644 → 100755
Expand Up @@ -10,9 +10,12 @@
#define _XNV_MESSAGE_LISTENER_H_

#include <XnThreadSafeQueue.h>
#include "XnVNiteEvents.h"
#include "XnVMessage.h"

class XnVMessageQueue;
class XnVMessageSpecificEvent;
class XnVEvent;

/**
* A XnVMessageListener is a general listener, that received Messages and handles them.
* It supports Multi-Threaded work, by knowing the thread it works in,
Expand Down Expand Up @@ -166,8 +169,6 @@ class XNV_NITE_API XnVMessageListener
*/
virtual void ClearQueue();
protected:
XN_DECLARE_THREAD_SAFE_QUEUE_DECL(XNV_NITE_API, XnVMessage*, XnVMessageQueue);
XN_DECLARE_EVENT_1ARG(XnVMessageSpecificEvent, XnVMessageEvent, XnVMessage*, pMessage);

XnBool IsInActivityThread() const;

Expand All @@ -184,11 +185,11 @@ class XNV_NITE_API XnVMessageListener

static const XnUInt32 ms_nSessionDefaultLength;

XnVMessageQueue m_MessageQueue;
XnVMessageQueue* m_pMessageQueue;

XnVMessageSpecificEvent m_UpdateCBs;
XnVEvent m_ActivateCBs;
XnVEvent m_DeactivateCBs;
XnVMessageSpecificEvent* m_pUpdateCBs;
XnVEvent* m_pActivateCBs;
XnVEvent* m_pDeactivateCBs;

XnChar* m_strListenerName;

Expand Down
8 changes: 4 additions & 4 deletions include/nite/XnVMessageMux.h 100644 → 100755
Expand Up @@ -9,11 +9,11 @@
#ifndef _XNV_MESSAGE_MUX_H_
#define _XNV_MESSAGE_MUX_H_

#include <XnStringsHash.h>

#include "XnVFilter.h"
#include "XnVComplexMessage.h"

class XnStringsHash;
class XnList;
/**
* A XnVMessageMux is a Filter which created Complex Messages from multiple other Messages
*/
Expand Down Expand Up @@ -76,9 +76,9 @@ class XNV_NITE_API XnVMessageMux :
XnVMuxMode m_eMode;
XnChar* m_strSpecific;

XnStringsHash m_hTypes;
XnStringsHash* m_phTypes;
XnUInt32 m_nExpected;
XnList m_hCurrent;
XnList* m_phCurrent;
};

#endif
4 changes: 2 additions & 2 deletions include/nite/XnVMultiItemHysteresis1D.h 100644 → 100755
Expand Up @@ -10,8 +10,8 @@
#define _XNV_MULTI_ITEM_HYSTERESIS_1D_H_

#include "XnVNiteDefs.h"
#include "XnVNiteEvents.h"

class XnVIntSpecificEvent;
/**
* The multi item hysteresis is initialized with a number of items,
* and sends a select event when moving between them.
Expand Down Expand Up @@ -141,7 +141,7 @@ class XNV_NITE_API XnVMultiItemHysteresis1D
XnFloat m_fBorderWidth;
XnFloat m_fHysteresisRatio;

XnVIntSpecificEvent m_ItemSelectCBs;
XnVIntSpecificEvent* m_pItemSelectCBs;
};

#endif // _XNV_MULTI_ITEM_HYSTERESIS_1D_H_
5 changes: 2 additions & 3 deletions include/nite/XnVMultiItemHysteresis2D.h 100644 → 100755
Expand Up @@ -10,11 +10,10 @@
#define _XNV_MULTI_ITEM_HYSTERESIS_2D_H_

#include "XnVNiteDefs.h"
#include "XnVNiteEvents.h"

class XnVSigmoid;
class XnVPointBuffer;

class XnVIntIntSpecificEvent;
/**
* The multi item controller is initialized with a number of items in each axis,
* and sends a select event when moving between them.
Expand Down Expand Up @@ -181,7 +180,7 @@ class XNV_NITE_API XnVMultiItemHysteresis2D

XnFloat m_fHysteresisRatio;

XnVIntIntSpecificEvent m_ItemSelectCBs;
XnVIntIntSpecificEvent* m_pItemSelectCBs;
}; // XnVMultiItem2DController

#endif // _XNV_MULTI_ITEM_HYSTERESIS_1D_H_
3 changes: 1 addition & 2 deletions include/nite/XnVMultiProcessFlowClient.h 100644 → 100755
Expand Up @@ -15,6 +15,7 @@
struct XnVNiteMultiprocessData;
class XnVMultiprocessReadSynchronizer;
class IdToContextMapping;
class XnVIntContextHash;

/**
* The multi process flow client is a near-equivalent to an XnVSessionManager, but which receives
Expand Down Expand Up @@ -78,8 +79,6 @@ class XNV_NITE_API XnVMultiProcessFlowClient :
XnStatus ForceSession(const XnPoint3D& ptFocus);
XnStatus TrackPoint(const XnPoint3D& pt);
protected:
XN_DECLARE_DEFAULT_HASH_DECL(XNV_NITE_API, XnUInt32, XnVHandPointContext*, XnVIntContextHash);

XnVHandPointContext* GetLocalContext(XnUInt32 nID);

void SendEventsForStateDiff(const XnVNiteMultiprocessData& NewState);
Expand Down
3 changes: 2 additions & 1 deletion include/nite/XnVMultiProcessFlowServer.h 100644 → 100755
Expand Up @@ -14,6 +14,7 @@

struct XnVNiteMultiprocessData;
class XnVMultiprocessWriteSynchronizer;
class XnVIntHash;

/**
* XnVMultiProcessFlowServer is both a XnVPointControl and a SessionListener. When placed into a NITE flow
Expand Down Expand Up @@ -82,7 +83,7 @@ class XNV_NITE_API XnVMultiProcessFlowServer :
XnUInt32 m_nWriteCount;
XnVMultiprocessWriteSynchronizer* m_pWritingLock;
XnVNiteMultiprocessData* m_pCurrentState;
XnVIntHash m_IdToIndex;
XnVIntHash* m_pIdToIndex;
XnBool m_bFocusStartSinceUpdate;

const XnVMultipleHands* m_pCurrentHands;
Expand Down
55 changes: 46 additions & 9 deletions include/nite/XnVMultipleHands.h 100644 → 100755
Expand Up @@ -10,7 +10,9 @@
#define _XNV_MULTIPLE_HANDS_H_

#include "XnVHandPointContext.h"
#include "XnVNiteEvents.h"

class XnVIntHash;
class XnVIntList;

/**
* A XnVMultipleHands holds all the known hands in the system.
Expand Down Expand Up @@ -271,6 +273,42 @@ class XNV_NITE_API XnVMultipleHands
Iterator(XnVMultipleHands* pHands, XnUInt32 nPosition);
};

class XNV_NITE_API ConstIteratorOld
{
public:
friend class XnVMultipleHands;
ConstIteratorOld(const ConstIteratorOld& other);
ConstIteratorOld& operator++();
ConstIteratorOld operator++(int);
XnBool operator==(const ConstIteratorOld& other) const;
XnBool operator!=(const ConstIteratorOld& other) const;
XnUInt32 operator*() const;
protected:
ConstIteratorOld(const XnVIntList* pList);
ConstIteratorOld(const XnVIntList* pList, XnUInt32 nPosition);

const XnVIntList* m_pList;
XnUInt32 m_nPosition;
XnBool m_bValid;
XnUInt32 m_nSize;
};

/**
* Enable olditeration over old hands. This is the non-const version of the iterator.
*/
class XNV_NITE_API IteratorOld : public ConstIteratorOld
{
public:
friend class XnVMultipleHands;

IteratorOld(const IteratorOld& other);
IteratorOld& operator++();
IteratorOld operator++(int);
protected:
IteratorOld(XnVIntList* pList);
IteratorOld(XnVIntList* pList, XnUInt32 nPosition);
};

/**
* Get an iterator to the first Hand Point Context
*
Expand Down Expand Up @@ -342,25 +380,25 @@ class XNV_NITE_API XnVMultipleHands
*
* @return An iterator to the first old ID. Will be equal to end() if list is empty
*/
XnVIntList::Iterator beginOld();
IteratorOld beginOld();
/**
* Get a const iterator to the first item in the 'Old' list
*
* @return A const iterator to the first old ID. Will be equal to end() if list is empty
*/
XnVIntList::ConstIterator beginOld() const;
ConstIteratorOld beginOld() const;
/**
* Get an iterator after the last item in the 'Old list
*
* @return An iterator to after the last old ID
*/
XnVIntList::Iterator endOld();
IteratorOld endOld();
/**
* Get a const iterator after the last item in the 'Old list
*
* @return A const iterator to after the last old ID
*/
XnVIntList::ConstIterator endOld() const;
ConstIteratorOld endOld() const;

/**
* Pick a new Single Interesting Point
Expand All @@ -383,11 +421,10 @@ class XNV_NITE_API XnVMultipleHands
XnVHandPointContext m_Hands[32];
XnUInt32 m_nNextAvailable;
XnUInt32 m_nAvailable;
XnVIntHash m_Id2Position;

XnVIntList m_ActiveIDs;
XnVIntList m_NewIDs;
XnVIntList m_OldIDs;
XnVIntList* m_pActiveIDs;
XnVIntList* m_pNewIDs;
XnVIntList* m_pOldIDs;

XnUInt32 m_nPrimaryID;

Expand Down
Empty file modified include/nite/XnVNite.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVNiteControls.h 100644 → 100755
Empty file.
Empty file modified include/nite/XnVNiteDefs.h 100644 → 100755
Empty file.

0 comments on commit 7e289c7

Please sign in to comment.