Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

XnVPointArea Class Reference

#include <XnVPointArea.h>

Inheritance diagram for XnVPointArea:
Inheritance graph
[legend]
Collaboration diagram for XnVPointArea:
Collaboration graph
[legend]

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")
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_SilentPoints
XnVUintSpecificEvent m_PointSilencedCBs
XnVUintSpecificEvent m_PointRevivedCBs
XnVUintSpecificEvent m_SilentPointRemovedCBs
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 21 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 32 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 28 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 36 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] bbArea The area in which points are legal
[in] bRelative TRUE if area is relative to focus point, FALSE if constant area
[in] strName Name 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] ptMins One of the points that define an axis-aligned 3D box
[in] ptMaxs One of the points that define an axis-aligned 3D box
[in] bRelative TRUE if area is relative to focus point, FALSE if constant area
[in] strName The name of this Point Area, for Log use

Member Function Documentation

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

Change the area in which points are allowed to exist

Parameters:
[in] bbArea The 3D Real World coordinates
[in] bRelative TRUE 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] ptMins One of the points that define an axis-aligned 3D box
[in] ptMaxs One of the points that define an axis-aligned 3D box
[in] bRelative TRUE 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] cxt User's context. The callback will be called with that context.
[in] CB The 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] nDelay The delay in milliseconds between silencing a point and removing it
[in] pGenerator The 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] nDelay The delay in milliseconds between silencing a point and removing it
[in] pTracker The 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] hCB The handle received when registering the callback.
void XnVPointArea::UnregisterPointSilenced ( XnCallbackHandle  hCB  ) 

Unregister a callback for when a point is silenced

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

Unregister a callback for when silent point is really removed

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

Intersect points with internal area

Parameters:
[in] hands The existing hands

Reimplemented from XnVPointControl.

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

Handle a new Message (expected to be XnVPointMessage)

Parameters:
[in] pMessage The message to handle

Reimplemented from XnVPointFilter.


Member Data Documentation

XnBoundingBox3D XnVPointArea::m_bbArea [protected]

Definition at line 160 of file XnVPointArea.h.

XnBoundingBox3D XnVPointArea::m_bbRelativeArea [protected]

Definition at line 163 of file XnVPointArea.h.

XnBool XnVPointArea::m_bRelative [protected]

Definition at line 162 of file XnVPointArea.h.

Definition at line 169 of file XnVPointArea.h.

Definition at line 170 of file XnVPointArea.h.

Definition at line 159 of file XnVPointArea.h.

XnUInt64 XnVPointArea::m_nRemovalDelay [protected]

Definition at line 173 of file XnVPointArea.h.

XnVUintSpecificEvent XnVPointArea::m_PointRevivedCBs [protected]

Definition at line 167 of file XnVPointArea.h.

XnVUintSpecificEvent XnVPointArea::m_PointSilencedCBs [protected]

Definition at line 167 of file XnVPointArea.h.

Definition at line 172 of file XnVPointArea.h.

Definition at line 171 of file XnVPointArea.h.

XnVUintSpecificEvent XnVPointArea::m_SilentPointRemovedCBs [protected]

Definition at line 167 of file XnVPointArea.h.

XnVIntHash XnVPointArea::m_SilentPoints [protected]

Definition at line 165 of file XnVPointArea.h.


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