NITE 1.5.1 - API Reference

XnVPointArea Class Reference

#include <XnVPointArea.h>

Inheritance diagram for XnVPointArea:
Collaboration diagram for XnVPointArea:

List of all members.

Public Types

typedef void(XN_CALLBACK_TYPE * PointSilencedCB )(XnUInt32 nID, void *cxt)
typedef void(XN_CALLBACK_TYPE * PointRevivedCB )(XnUInt32 nID, void *cxt)
typedef void(XN_CALLBACK_TYPE * SilentPointRemovedCB )(XnUInt32 nID, void *cxt)

Public Member Functions

 XnVPointArea (const XnBoundingBox3D &bbArea, XnBool bRelative=false, const XnChar *strName="XnVPointArea")
 XnVPointArea (const XnPoint3D &ptMins, const XnPoint3D &ptMaxs, XnBool bRelative=false, const XnChar *strName="XnVPointArea")
virtual ~XnVPointArea ()
void ChangeArea (const XnBoundingBox3D &bbArea, XnBool bRelative=false)
void ChangeArea (const XnPoint3D &ptMins, const XnPoint3D &ptMaxs, XnBool bRelative=false)
void Update (XnVMessage *pMessage)
void Update (const XnVMultipleHands &hands)
XnCallbackHandle RegisterPointSilenced (void *cxt, PointSilencedCB CB)
XnCallbackHandle RegisterPointRevived (void *cxt, PointRevivedCB CB)
XnCallbackHandle RegisterSilentPointRemoved (void *cxt, SilentPointRemovedCB CB)
void UnregisterPointSilenced (XnCallbackHandle hCB)
void UnregisterPointRevived (XnCallbackHandle hCB)
void UnregisterSilentPointRemoved (XnCallbackHandle hCB)
void RemoveSilent (XnUInt64 nDelay, XnVSessionGenerator *pGenerator)
void RemoveSilent (XnUInt64 nDelay, XnVPointTracker *pTracker)

Protected Member Functions

XnBool InBoundingBox (const XnPoint3D &pt) const
XnBool IsSilent (XnUInt32 nID) const
void SilencePoint (XnUInt32 nID, XnFloat fTime)
void RevivePoint (XnUInt32 nID)
XnStatus CheckDelay (XnUInt32 nID, XnFloat fTime)
void ChangeConstantArea (const XnBoundingBox3D &bbArea)
void ChangeRelativeArea (const XnBoundingBox3D &bbArea)

Protected Attributes

XnVMultipleHands m_FilteredHands
XnBoundingBox3D m_bbArea
XnBool m_bRelative
XnBoundingBox3D m_bbRelativeArea
XnVIntHash * m_pSilentPoints
XnVUintSpecificEvent * m_pPointSilencedCBs
XnVUintSpecificEvent * m_pPointRevivedCBs
XnVUintSpecificEvent * m_pSilentPointRemovedCBs
XnBool m_bRemoveByGenerator
XnBool m_bRemoveByTracker
XnVPointTrackerm_pRemovingTracker
XnVSessionGeneratorm_pRemovingGenerator
XnUInt64 m_nRemovalDelay

Detailed Description

Defines a legal bounding box. Any point that goes outside it will seem to be lost to anyone further along the chain - it will be silenced by the PointArea. If a point is silent for more than a threshold, it will be removed from tracking (for real).

Definition at line 24 of file XnVPointArea.h.


Member Typedef Documentation

typedef void(XN_CALLBACK_TYPE* XnVPointArea::PointRevivedCB)(XnUInt32 nID, void *cxt)

Type for callbacks to be called when a previously silenced point is revived

Definition at line 35 of file XnVPointArea.h.

typedef void(XN_CALLBACK_TYPE* XnVPointArea::PointSilencedCB)(XnUInt32 nID, void *cxt)

Type for callbacks to be called when a point is silenced

Definition at line 31 of file XnVPointArea.h.

typedef void(XN_CALLBACK_TYPE* XnVPointArea::SilentPointRemovedCB)(XnUInt32 nID, void *cxt)

Type for callbacks to be called when a previously silenced point is really removed

Definition at line 39 of file XnVPointArea.h.


Constructor & Destructor Documentation

XnVPointArea::XnVPointArea ( const XnBoundingBox3D &  bbArea,
XnBool  bRelative = false,
const XnChar *  strName = "XnVPointArea" 
)

Constructor. Create a new Point Area from a bounding box

Parameters:
[in]bbAreaThe area in which points are legal
[in]bRelativeTRUE if area is relative to focus point, FALSE if constant area
[in]strNameName of the control, for log purposes.
XnVPointArea::XnVPointArea ( const XnPoint3D &  ptMins,
const XnPoint3D &  ptMaxs,
XnBool  bRelative = false,
const XnChar *  strName = "XnVPointArea" 
)

Constructor. Create from two points, defining an axis-aligned 3d box.

Parameters:
[in]ptMinsOne of the points that define an axis-aligned 3D box
[in]ptMaxsOne of the points that define an axis-aligned 3D box
[in]bRelativeTRUE if area is relative to focus point, FALSE if constant area
[in]strNameThe name of this Point Area, for Log use
virtual XnVPointArea::~XnVPointArea ( ) [virtual]

Destructor - deallocate all internal data


Member Function Documentation

void XnVPointArea::ChangeArea ( const XnBoundingBox3D &  bbArea,
XnBool  bRelative = false 
)

Change the area in which points are allowed to exist

Parameters:
[in]bbAreaThe 3D Real World coordinates
[in]bRelativeTRUE if area is relative to focus point, FALSE if constant area
void XnVPointArea::ChangeArea ( const XnPoint3D &  ptMins,
const XnPoint3D &  ptMaxs,
XnBool  bRelative = false 
)

Change the area in which points are allowed to exist

Parameters:
[in]ptMinsOne of the points that define an axis-aligned 3D box
[in]ptMaxsOne of the points that define an axis-aligned 3D box
[in]bRelativeTRUE if area is relative to focus point, FALSE if constant area
void XnVPointArea::ChangeConstantArea ( const XnBoundingBox3D &  bbArea) [protected]
void XnVPointArea::ChangeRelativeArea ( const XnBoundingBox3D &  bbArea) [protected]
XnStatus XnVPointArea::CheckDelay ( XnUInt32  nID,
XnFloat  fTime 
) [protected]
XnBool XnVPointArea::InBoundingBox ( const XnPoint3D &  pt) const [protected]
XnBool XnVPointArea::IsSilent ( XnUInt32  nID) const [protected]
XnCallbackHandle XnVPointArea::RegisterPointRevived ( void *  cxt,
PointRevivedCB  CB 
)

Register a callback for when a point is revived

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointArea::RegisterPointSilenced ( void *  cxt,
PointSilencedCB  CB 
)

Register a callback for when a point is silenced

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
XnCallbackHandle XnVPointArea::RegisterSilentPointRemoved ( void *  cxt,
SilentPointRemovedCB  CB 
)

Register a callback for when silent point is really removed

Parameters:
[in]cxtUser's context. The callback will be called with that context.
[in]CBThe Callback
Returns:
A handle to the callback, to allow unregistering.
void XnVPointArea::RemoveSilent ( XnUInt64  nDelay,
XnVSessionGenerator pGenerator 
)

Remove silent points after some delay from a SessionGenerator

Parameters:
[in]nDelayThe delay in milliseconds between silencing a point and removing it
[in]pGeneratorThe SessionGenerator through which to remove the point
void XnVPointArea::RemoveSilent ( XnUInt64  nDelay,
XnVPointTracker pTracker 
)

Remove silent points after some delay from a PointTracker

Parameters:
[in]nDelayThe delay in milliseconds between silencing a point and removing it
[in]pTrackerThe PointTracker through which to remove the point
void XnVPointArea::RevivePoint ( XnUInt32  nID) [protected]
void XnVPointArea::SilencePoint ( XnUInt32  nID,
XnFloat  fTime 
) [protected]
void XnVPointArea::UnregisterPointRevived ( XnCallbackHandle  hCB)

Unregister a callback for when a point is revived

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointArea::UnregisterPointSilenced ( XnCallbackHandle  hCB)

Unregister a callback for when a point is silenced

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointArea::UnregisterSilentPointRemoved ( XnCallbackHandle  hCB)

Unregister a callback for when silent point is really removed

Parameters:
[in]hCBThe handle received when registering the callback.
void XnVPointArea::Update ( const XnVMultipleHands hands) [virtual]

Intersect points with internal area

Parameters:
[in]handsThe existing hands

Reimplemented from XnVPointControl.

void XnVPointArea::Update ( XnVMessage pMessage) [virtual]

Handle a new Message (expected to be XnVPointMessage)

Parameters:
[in]pMessageThe message to handle

Reimplemented from XnVPointFilter.


Member Data Documentation

XnBoundingBox3D XnVPointArea::m_bbArea [protected]

Definition at line 167 of file XnVPointArea.h.

XnBoundingBox3D XnVPointArea::m_bbRelativeArea [protected]

Definition at line 170 of file XnVPointArea.h.

XnBool XnVPointArea::m_bRelative [protected]

Definition at line 169 of file XnVPointArea.h.

Definition at line 178 of file XnVPointArea.h.

Definition at line 179 of file XnVPointArea.h.

Definition at line 166 of file XnVPointArea.h.

XnUInt64 XnVPointArea::m_nRemovalDelay [protected]

Definition at line 182 of file XnVPointArea.h.

XnVUintSpecificEvent* XnVPointArea::m_pPointRevivedCBs [protected]

Definition at line 175 of file XnVPointArea.h.

XnVUintSpecificEvent* XnVPointArea::m_pPointSilencedCBs [protected]

Definition at line 174 of file XnVPointArea.h.

Definition at line 180 of file XnVPointArea.h.

XnVUintSpecificEvent* XnVPointArea::m_pSilentPointRemovedCBs [protected]

Definition at line 176 of file XnVPointArea.h.

XnVIntHash* XnVPointArea::m_pSilentPoints [protected]

Definition at line 172 of file XnVPointArea.h.


The documentation for this class was generated from the following file: