#include <XnVMultiItemHysteresis1D.h>
List of all members.
Detailed Description
The multi item hysteresis is initialized with a number of items, and sends a select event when moving between them. On update it gets a number between 0 and 1, and sees which cell that translates into. Selection here means being over the item. The XnVMultiItemHysteresis1D defines one events:
A hysteresis ratio is used to 'enlarge' the current item.
Definition at line 25 of file XnVMultiItemHysteresis1D.h.
Member Typedef Documentation
Constructor & Destructor Documentation
XnVMultiItemHysteresis1D::XnVMultiItemHysteresis1D |
( |
XnInt32 |
nItemCount, |
|
|
XnFloat |
fBorderWidth = 0 , |
|
|
XnFloat |
fHysteresisRatio = ms_fDefaultHysteresisRatio | |
|
) |
| | |
Constructor
- Parameters:
-
[in] | nItemCount | Number of items |
[in] | fBorderWidth | Size to disregard from either side |
[in] | fHysteresisRatio | Additional size (from either side) it takes to exit a specific item. |
XnVMultiItemHysteresis1D::~XnVMultiItemHysteresis1D |
( |
|
) |
|
Member Function Documentation
void XnVMultiItemHysteresis1D::CalculateMinAndMax |
( |
|
) |
[protected] |
XnFloat XnVMultiItemHysteresis1D::GetBorderWidth |
( |
|
) |
const |
Get the border width - the space on either side that isn't part of any item.
- Returns:
- The current border width
XnFloat XnVMultiItemHysteresis1D::GetHysteresisRatio |
( |
|
) |
const |
Get the ratio for an item selection to change.
- Returns:
- The ratio
XnUInt32 XnVMultiItemHysteresis1D::GetItemCount |
( |
|
) |
const |
Get the current number of items.
- Returns:
- The current number of items
XnFloat XnVMultiItemHysteresis1D::GetMaxValue |
( |
|
) |
const |
Get the maximal value the hysteresis expects.
- Returns:
- The maximal value
XnFloat XnVMultiItemHysteresis1D::GetMinValue |
( |
|
) |
const |
Get the minimal value the hysteresis expects.
- Returns:
- The minimal value
bool XnVMultiItemHysteresis1D::IsValueInRange |
( |
XnFloat |
Value |
) |
[protected] |
void XnVMultiItemHysteresis1D::ItemSelect |
( |
XnInt32 |
nItemIndex |
) |
|
Invoke the selection event
- Parameters:
-
[in] | nItemIndex | The item that is selected |
void XnVMultiItemHysteresis1D::LostPoint |
( |
|
) |
|
Lose the point. Clear internal buffer.
XnCallbackHandle XnVMultiItemHysteresis1D::RegisterItemSelect |
( |
void * |
cxt, |
|
|
ItemSelectedCB |
pCB | |
|
) |
| | |
Register for the selection event
- Parameters:
-
[in] | cxt | User's context |
[in] | pCB | The Callback to call when the event is invoked. |
- Returns:
- A handle, to allow unregistration.
XnStatus XnVMultiItemHysteresis1D::SetBorderWidth |
( |
XnFloat |
fWidth |
) |
|
Change the border width
- Parameters:
-
[in] | fWidth | The new border width |
void XnVMultiItemHysteresis1D::SetHysteresisRatio |
( |
XnFloat |
fRatio |
) |
|
Change the hysteresis ratio
- Parameters:
-
[in] | fRatio | New hysteresis ratio |
void XnVMultiItemHysteresis1D::SetItemCount |
( |
XnUInt32 |
nCount |
) |
|
Change the current number of items
- Parameters:
-
[in] | nCount | New number of items |
void XnVMultiItemHysteresis1D::UnregisterItemSelect |
( |
XnCallbackHandle |
handle |
) |
|
Unregister from the selection event
- Parameters:
-
[in] | handle | The handle provided on registration. |
XnStatus XnVMultiItemHysteresis1D::Update |
( |
XnFloat |
Value |
) |
|
Update a value between 0 and 1, which will be translated into an index of the current cell.
Member Data Documentation
The documentation for this class was generated from the following file: