NITE 1.5.1 - API Reference

XnVMultipleHands Class Reference

#include <XnVMultipleHands.h>

Collaboration diagram for XnVMultipleHands:

List of all members.

Classes

class  ConstIterator
class  ConstIteratorOld
class  Iterator
class  IteratorOld

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
IteratorOld beginOld ()
ConstIteratorOld beginOld () const
IteratorOld endOld ()
ConstIteratorOld 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
XnVIntList * m_pActiveIDs
XnVIntList * m_pNewIDs
XnVIntList * m_pOldIDs
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 22 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]otherThe 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]pContextThe 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
IteratorOld 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
ConstIteratorOld 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]otherThe 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
IteratorOld XnVMultipleHands::endOld ( )

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

Returns:
An iterator to after the last old ID
ConstIteratorOld 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]nIDThe 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]nIDThe 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]nIDThe 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]nIDThe 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]nIDThe 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]nIDThe 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]nIDThe ID to check
Returns:
TRUE of the ID is 'Old', FALSE otherwise
void XnVMultipleHands::MarkActive ( XnUInt32  nID)

Mark a hand as 'Active'.

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

Mark a hand as 'New'

Parameters:
[in]nIDThe 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]nIDThe 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]nIDThe 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]nIDThe ID that should no longer be considered 'Active'
void XnVMultipleHands::RemoveNew ( XnUInt32  nID)

Remove marking as 'New'

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

Remove marking as 'Old'

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

Replace the focus point

Parameters:
[in]ptFocusPointthe new focus point

Member Data Documentation

Definition at line 421 of file XnVMultipleHands.h.

XnUInt32 XnVMultipleHands::m_nAvailable [private]

Definition at line 423 of file XnVMultipleHands.h.

Definition at line 422 of file XnVMultipleHands.h.

XnUInt32 XnVMultipleHands::m_nPrimaryID [private]

Definition at line 429 of file XnVMultipleHands.h.

XnVIntList* XnVMultipleHands::m_pActiveIDs [private]

Definition at line 425 of file XnVMultipleHands.h.

XnVIntList* XnVMultipleHands::m_pNewIDs [private]

Definition at line 426 of file XnVMultipleHands.h.

XnVIntList* XnVMultipleHands::m_pOldIDs [private]

Definition at line 427 of file XnVMultipleHands.h.

XnPoint3D XnVMultipleHands::m_ptFocusPoint [private]

Definition at line 431 of file XnVMultipleHands.h.


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