Public Member Functions | Protected Member Functions | Protected Attributes

XnVSessionGenerator Class Reference

#include <XnVSessionGenerator.h>

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

List of all members.

Public Member Functions

 XnVSessionGenerator (const XnChar *strName="XnVSessionGenerator")
virtual ~XnVSessionGenerator ()
XnVHandle RegisterSession (XnVSessionListener *pListener)
XnVHandle RegisterSession (void *cxt, XnVSessionListener::OnSessionStartCB StartCB, XnVSessionListener::OnSessionEndCB EndCB, XnVSessionListener::OnFocusStartDetectedCB MidCB=NULL)
void UnregisterSession (XnVSessionListener *pSessionListener)
void UnregisterSession (XnVHandle nHandle)
XnBool IsInSession () const
virtual XnStatus LosePoint (XnUInt32 nID)=0
virtual XnStatus LosePoints ()=0
virtual XnStatus EndSession ()=0
virtual XnStatus ForceSession (const XnPoint3D &ptFocus)=0
virtual XnStatus TrackPoint (const XnPoint3D &pt)=0
XnStatus GetFocusPoint (XnPoint3D &ptFocus) const

Protected Member Functions

virtual void SessionStart (const XnPoint3D &ptPosition)
virtual void SessionMidGesture (const XnChar *strFocus, const XnPoint3D &ptFocus, XnFloat fProgress)
virtual void SessionStop ()

Protected Attributes

XnBool m_bInSession
XnPoint3D m_ptFocusPoint
XnPoint3D m_ptStartTrackingPoint
XnVSessionListenerList * m_pSessionListeners

Detailed Description

A Session Generator generates Session Messages and calls SessionListener's callbacks

Definition at line 19 of file XnVSessionGenerator.h.


Constructor & Destructor Documentation

XnVSessionGenerator::XnVSessionGenerator ( const XnChar *  strName = "XnVSessionGenerator"  ) 

Constructor. Create a new Session Generator

Parameters:
[in] strName A name, for Log use
virtual XnVSessionGenerator::~XnVSessionGenerator (  )  [virtual]

Member Function Documentation

virtual XnStatus XnVSessionGenerator::EndSession (  )  [pure virtual]
virtual XnStatus XnVSessionGenerator::ForceSession ( const XnPoint3D &  ptFocus  )  [pure virtual]
XnStatus XnVSessionGenerator::GetFocusPoint ( XnPoint3D &  ptFocus  )  const
XnBool XnVSessionGenerator::IsInSession (  )  const

Tells if currently in Session

Returns:
TRUE if in Session (Started but never Stopped), FALSE otherwise

Reimplemented in XnVSessionManager.

virtual XnStatus XnVSessionGenerator::LosePoint ( XnUInt32  nID  )  [pure virtual]

Stop tracking a specific point

Parameters:
[in] nID The ID of the point to stop track

Implemented in XnVMultiProcessFlowClient, and XnVSessionManager.

virtual XnStatus XnVSessionGenerator::LosePoints (  )  [pure virtual]

Stop tracking all points

Implemented in XnVMultiProcessFlowClient, and XnVSessionManager.

XnVHandle XnVSessionGenerator::RegisterSession ( XnVSessionListener pListener  ) 

Add a listener for Session events

Parameters:
[in] pListener The listener to be called on session events
Returns:
A handle, allowing unregistering.
XnVHandle XnVSessionGenerator::RegisterSession ( void *  cxt,
XnVSessionListener::OnSessionStartCB  StartCB,
XnVSessionListener::OnSessionEndCB  EndCB,
XnVSessionListener::OnFocusStartDetectedCB  MidCB = NULL 
)

Add a functions to be called on Session events, with a specific context

Parameters:
[in] cxt The context to use when calling the functions
[in] StartCB The function to call when a new Session has started
[in] EndCB The function to call when the Session has ended
[in] MidCB The (optional) function to call when a focus gesture started
Returns:
A handle, allowing unregistering.
virtual void XnVSessionGenerator::SessionMidGesture ( const XnChar *  strFocus,
const XnPoint3D &  ptFocus,
XnFloat  fProgress 
) [protected, virtual]
virtual void XnVSessionGenerator::SessionStart ( const XnPoint3D &  ptPosition  )  [protected, virtual]
virtual void XnVSessionGenerator::SessionStop (  )  [protected, virtual]

Reimplemented in XnVSessionManager.

virtual XnStatus XnVSessionGenerator::TrackPoint ( const XnPoint3D &  pt  )  [pure virtual]
void XnVSessionGenerator::UnregisterSession ( XnVSessionListener pSessionListener  ) 

Unregister a previously registered Session Listener

Parameters:
[in] pSessionListener The session listener that was registered
void XnVSessionGenerator::UnregisterSession ( XnVHandle  nHandle  ) 

Unregister previously registered Session Listener or functions, by handle

Parameters:
[in] nHandle The handle received on registration

Member Data Documentation

Definition at line 92 of file XnVSessionGenerator.h.

XnVSessionListenerList* XnVSessionGenerator::m_pSessionListeners [protected]

Definition at line 96 of file XnVSessionGenerator.h.

XnPoint3D XnVSessionGenerator::m_ptFocusPoint [protected]

Definition at line 93 of file XnVSessionGenerator.h.

Definition at line 94 of file XnVSessionGenerator.h.


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