Classes | Public Member Functions | Private Attributes

XnVMultipleHands Class Reference

#include <XnVMultipleHands.h>

Collaboration diagram for XnVMultipleHands:
Collaboration graph
[legend]

List of all members.

Classes

class  ConstIterator
class  Iterator

Public Member Functions

 XnVMultipleHands ()
 XnVMultipleHands (const XnVMultipleHands &other)
 ~XnVMultipleHands ()
XnStatus Add (const XnVHandPointContext *pContext)
XnStatus Remove (XnUInt32 nID)
XnVHandPointContextGetContext (XnUInt32 nID)
const XnVHandPointContextGetContext (XnUInt32 nID) const
XnVHandPointContextGetPrimaryContext ()
const XnVHandPointContextGetPrimaryContext () const
void MarkNew (XnUInt32 nID)
void MarkOld (XnUInt32 nID)
void MarkActive (XnUInt32 nID)
void RemoveNew (XnUInt32 nID)
void RemoveOld (XnUInt32 nID)
void RemoveActive (XnUInt32 nID)
XnUInt32 NewEntries () const
XnUInt32 OldEntries () const
XnUInt32 ActiveEntries () const
void Clone (XnVMultipleHands &other) const
void Clear ()
void ClearLists ()
void ClearNewList ()
void ClearOldList ()
Iterator begin ()
ConstIterator begin () const
Iterator end ()
ConstIterator end () const
Iterator Find (XnUInt32 nID)
ConstIterator Find (XnUInt32 nID) const
XnBool IsNew (XnUInt32 nID) const
XnBool IsOld (XnUInt32 nID) const
XnBool IsActive (XnUInt32 nID) const
XnVIntList::Iterator beginOld ()
XnVIntList::ConstIterator beginOld () const
XnVIntList::Iterator endOld ()
XnVIntList::ConstIterator endOld () const
void ReassignPrimary (XnUInt32 nHint=0)
void SetFocusPoint (const XnPoint3D &ptFocusPoint)
const XnPoint3D & GetFocusPoint () const

Private Attributes

XnVHandPointContext m_Hands [32]
XnUInt32 m_nNextAvailable
XnUInt32 m_nAvailable
XnVIntHash m_Id2Position
XnVIntList m_ActiveIDs
XnVIntList m_NewIDs
XnVIntList m_OldIDs
XnUInt32 m_nPrimaryID
XnPoint3D m_ptFocusPoint

Detailed Description

A XnVMultipleHands holds all the known hands in the system. It holds lists of which hands are new, which are active, and another list of the hands that aren't there anymore, but were still there last frame.

Definition at line 20 of file XnVMultipleHands.h.


Constructor & Destructor Documentation

XnVMultipleHands::XnVMultipleHands (  ) 

Create an empty list of hands

XnVMultipleHands::XnVMultipleHands ( const XnVMultipleHands other  ) 

Copy constructor. Create a list of the same hands as the other.

Parameters:
[in] other The object from which to copy the list of hands
XnVMultipleHands::~XnVMultipleHands (  ) 

Member Function Documentation

XnUInt32 XnVMultipleHands::ActiveEntries (  )  const

Get the number of hands that are considered 'Active'

Returns:
The number of 'Active' entries
XnStatus XnVMultipleHands::Add ( const XnVHandPointContext pContext  ) 

Add a hand

Parameters:
[in] pContext The Hand Point Context of the new hand
Iterator XnVMultipleHands::begin (  ) 

Get an iterator to the first Hand Point Context

Returns:
An iterator to the first Hand Point Context. Will be equal to end() if none exist
ConstIterator XnVMultipleHands::begin (  )  const

Get a const iterator to the first Hand Point Context

Returns:
A const iterator to the first Hand Point Context. Will be equal to end() if none exist
XnVIntList::Iterator XnVMultipleHands::beginOld (  ) 

Get an iterator to the first item in the 'Old' list

Returns:
An iterator to the first old ID. Will be equal to end() if list is empty
XnVIntList::ConstIterator XnVMultipleHands::beginOld (  )  const

Get a const iterator to the first item in the 'Old' list

Returns:
A const iterator to the first old ID. Will be equal to end() if list is empty
void XnVMultipleHands::Clear (  ) 

Remove all Hand Point Contexts

void XnVMultipleHands::ClearLists (  ) 

Remove all entries from 'New', 'Old' and 'Active' lists

void XnVMultipleHands::ClearNewList (  ) 

Remove all entries from the 'New' list.

void XnVMultipleHands::ClearOldList (  ) 

Remove all entries from the 'Old' list.

void XnVMultipleHands::Clone ( XnVMultipleHands other  )  const

Create a copy of the object, with same lists and copies of all Hand Point Contexts

Parameters:
[out] other The new copy of the object
Iterator XnVMultipleHands::end (  ) 

Get an iterator after the last Hand Point Context

Returns:
An iterator to after the last Hand Point Context
ConstIterator XnVMultipleHands::end (  )  const

Get a const iterator after the last Hand Point Context

Returns:
A const iterator to after the last Hand Point Context
XnVIntList::Iterator XnVMultipleHands::endOld (  ) 

Get an iterator after the last item in the 'Old list

Returns:
An iterator to after the last old ID
XnVIntList::ConstIterator XnVMultipleHands::endOld (  )  const

Get a const iterator after the last item in the 'Old list

Returns:
A const iterator to after the last old ID
Iterator XnVMultipleHands::Find ( XnUInt32  nID  ) 

Search for a Hand Point Context by ID

Parameters:
[in] nID The ID of the requested Hand Point Context
Returns:
An iterator to the Hand Point Context that matches the ID, or to end() if no match
ConstIterator XnVMultipleHands::Find ( XnUInt32  nID  )  const

Search for a Hand Point Context by ID

Parameters:
[in] nID The ID of the requested Hand Point Context
Returns:
A const iterator to the Hand Point Context that matches the ID, or to end() if no match
const XnVHandPointContext* XnVMultipleHands::GetContext ( XnUInt32  nID  )  const

Get the context of a hand

Parameters:
[in] nID The ID of the hand
Returns:
The Hand Point Context of that ID, or NULL if it doesn't exist
XnVHandPointContext* XnVMultipleHands::GetContext ( XnUInt32  nID  ) 

Get the context of a hand

Parameters:
[in] nID The ID of the hand
Returns:
The Hand Point Context of that ID, or NULL if it doesn't exist
const XnPoint3D& XnVMultipleHands::GetFocusPoint (  )  const

Get the focus point

Returns:
The focus point
XnVHandPointContext* XnVMultipleHands::GetPrimaryContext (  ) 

Get the context of the single selected hand

Returns:
The Hand Point Context of the single selected hand, or NULL if no hands exist
const XnVHandPointContext* XnVMultipleHands::GetPrimaryContext (  )  const

Get the context of the single selected hand

Returns:
The Hand Point Context of the single selected hand, or NULL if no hands exist
XnBool XnVMultipleHands::IsActive ( XnUInt32  nID  )  const

Check if a certain ID exists in the 'Active' list

Parameters:
[in] nID The ID to check
Returns:
TRUE of the ID is 'Active', FALSE otherwise
XnBool XnVMultipleHands::IsNew ( XnUInt32  nID  )  const

Check if a certain ID exists in the 'New' list

Parameters:
[in] nID The ID to check
Returns:
TRUE of the ID is 'New', FALSE otherwise
XnBool XnVMultipleHands::IsOld ( XnUInt32  nID  )  const

Check if a certain ID exists in the 'Old' list

Parameters:
[in] nID The ID to check
Returns:
TRUE of the ID is 'Old', FALSE otherwise
void XnVMultipleHands::MarkActive ( XnUInt32  nID  ) 

Mark a hand as 'Active'.

Parameters:
[in] nID The ID the should be considered 'Active'
void XnVMultipleHands::MarkNew ( XnUInt32  nID  ) 

Mark a hand as 'New'

Parameters:
[in] nID The ID that should be considered 'New'
void XnVMultipleHands::MarkOld ( XnUInt32  nID  ) 

Mark a hand as 'Old'. This means a Hand Point Context may not exist for this ID

Parameters:
[in] nID The ID that should be considered 'Old'
XnUInt32 XnVMultipleHands::NewEntries (  )  const

Get the number of hands that are considered 'New'

Returns:
The number of 'New' entries
XnUInt32 XnVMultipleHands::OldEntries (  )  const

Get the number of hands that are considered 'Old'

Returns:
The number of 'Old' entries
void XnVMultipleHands::ReassignPrimary ( XnUInt32  nHint = 0  ) 

Pick a new Single Interesting Point

XnStatus XnVMultipleHands::Remove ( XnUInt32  nID  ) 

Remove an existing hand

Parameters:
[in] nID The ID of the hand to be removed
Returns:
The Hand Point Context that was removed, or NULL if it doesn't exist
void XnVMultipleHands::RemoveActive ( XnUInt32  nID  ) 

Remove marking as 'Active'

Parameters:
[in] nID The ID that should no longer be considered 'Active'
void XnVMultipleHands::RemoveNew ( XnUInt32  nID  ) 

Remove marking as 'New'

Parameters:
[in] nID The ID that should no longer be considered 'New'
void XnVMultipleHands::RemoveOld ( XnUInt32  nID  ) 

Remove marking as 'Old'

Parameters:
[in] nID The ID that should no longer be considered 'Old'
void XnVMultipleHands::SetFocusPoint ( const XnPoint3D &  ptFocusPoint  ) 

Replace the focus point

Parameters:
[in] ptFocusPoint the new focus point

Member Data Documentation

XnVIntList XnVMultipleHands::m_ActiveIDs [private]

Definition at line 388 of file XnVMultipleHands.h.

Definition at line 383 of file XnVMultipleHands.h.

XnVIntHash XnVMultipleHands::m_Id2Position [private]

Definition at line 386 of file XnVMultipleHands.h.

XnUInt32 XnVMultipleHands::m_nAvailable [private]

Definition at line 385 of file XnVMultipleHands.h.

XnVIntList XnVMultipleHands::m_NewIDs [private]

Definition at line 389 of file XnVMultipleHands.h.

Definition at line 384 of file XnVMultipleHands.h.

XnUInt32 XnVMultipleHands::m_nPrimaryID [private]

Definition at line 392 of file XnVMultipleHands.h.

XnVIntList XnVMultipleHands::m_OldIDs [private]

Definition at line 390 of file XnVMultipleHands.h.

XnPoint3D XnVMultipleHands::m_ptFocusPoint [private]

Definition at line 394 of file XnVMultipleHands.h.


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