#include <XnVSelectableSlider2D.h>


Public Types | |
| typedef void(XN_CALLBACK_TYPE * | ItemHoverCB )(XnInt32 nXIndex, XnInt32 nYIndex, void *pUserCxt) |
| typedef void(XN_CALLBACK_TYPE * | ItemSelectCB )(XnInt32 nXIndex, XnInt32 nYIndex, XnVDirection eDir, void *pUserCxt) |
| typedef void(XN_CALLBACK_TYPE * | OffAxisMovementCB )(XnVDirection eDir, void *pUserCxt) |
| typedef void(XN_CALLBACK_TYPE * | ValueChangeCB )(XnFloat fXValue, XnFloat fYValue, void *pUserCxt) |
| typedef void(XN_CALLBACK_TYPE * | ScrollCB )(XnFloat fXValue, XnFloat fYValue, void *pUserCxt) |
Public Member Functions | |
| XnVSelectableSlider2D (XnInt32 nXItems, XnInt32 nYItems, XnFloat fSliderSizeX=ms_fDefaultSliderSize, XnFloat fSliderSizeY=ms_fDefaultSliderSize, XnFloat fBorderWidth=0, const XnChar *strName="XnVSelectableSlider2D") | |
| virtual | ~XnVSelectableSlider2D () |
| void | OnPrimaryPointCreate (const XnVHandPointContext *pContext, const XnPoint3D &ptFocus) |
| void | OnPrimaryPointUpdate (const XnVHandPointContext *pContext) |
| void | OnPrimaryPointDestroy (XnUInt32 nID) |
| XnCallbackHandle | RegisterItemHover (void *cxt, ItemHoverCB CB) |
| XnCallbackHandle | RegisterScroll (void *cxt, ScrollCB CB) |
| XnCallbackHandle | RegisterValueChange (void *cxt, ValueChangeCB CB) |
| XnCallbackHandle | RegisterItemSelect (void *cxt, ItemSelectCB CB) |
| XnCallbackHandle | RegisterOffAxisMovement (void *cxt, OffAxisMovementCB CB) |
| void | UnregisterItemHover (XnCallbackHandle hCB) |
| void | UnregisterScroll (XnCallbackHandle hCB) |
| void | UnregisterValueChange (XnCallbackHandle hCB) |
| void | UnregisterItemSelect (XnCallbackHandle hCB) |
| void | UnregisterOffAxisMovement (XnCallbackHandle hCB) |
| void | Reposition (const XnPoint3D &ptCenter) |
| void | GetCenter (XnPoint3D &ptCenter) const |
| void | GetSliderSize (XnFloat &fSliderXSize, XnFloat &fSliderYSize) const |
| void | SetSliderSize (XnFloat fSliderXSize, XnFloat fSliderYSize) |
| XnUInt32 | GetItemXCount () const |
| XnUInt32 | GetItemYCount () const |
| void | SetItemCount (XnUInt32 nItemXCount, XnUInt32 nItemYCount) |
| void | SetItemXCount (XnUInt32 nItemXCount) |
| void | SetItemYCount (XnUInt32 nItemYCount) |
| void | SetValueChangeOnOffAxis (XnBool bReport) |
| XnBool | GetValueChangeOnOffAxis () const |
| XnFloat | GetBorderWidth () const |
| XnStatus | SetBorderWidth (XnFloat fWidth) |
| void | SetHysteresisRatio (XnFloat fRatio) |
| XnFloat | GetHysteresisRatio () const |
Static Public Attributes | |
| static const XnFloat | ms_fDefaultSliderSize |
Protected Member Functions | |
| void | UpdateSlider (XnFloat fXValue, XnFloat fYValue) |
| void | PointDeleted (XnBool bReason) |
| void | PointMoved (const XnPoint3D &pt, XnFloat fTime) |
| void | ItemHover (XnInt32 nXIndex, XnInt32 nYIndex) |
| void | Scroll (XnFloat fXValue, XnFloat fYValue) |
| void | ValueChange (XnFloat fXValue, XnFloat fYValue) |
| void | ItemSelect (XnVDirection eDir) |
| void | OffAxisMovement (XnVDirection eDir) |
Static Protected Member Functions | |
| static void XN_CALLBACK_TYPE | Slider_ValueChange (XnFloat fXValue, XnFloat fYValue, void *pContext) |
| static void XN_CALLBACK_TYPE | Slider_OffAxis (XnVDirection eDir, void *cxt) |
| static void XN_CALLBACK_TYPE | Hysteresis_ItemSelected (XnInt32 nXItem, XnInt32 nYItem, void *pContext) |
| static void XN_CALLBACK_TYPE | Scroller2D_Scrolled (XnFloat fXValue, XnFloat fYValue, void *pContext) |
| static void XN_CALLBACK_TYPE | SecondarySlider_OffAxisMovement (XnVDirection eDir, void *cxt) |
| static void XN_CALLBACK_TYPE | SecondarySlider_ValueChange (XnFloat fValue, void *cxt) |
| static void XN_CALLBACK_TYPE | OffAxisHysteresis_ItemSelected (XnInt32 nItem, void *cxt) |
Protected Attributes | |
| XnBool | m_bValueChangeWithoutBorders |
| XnBool | m_bPositioned |
| XnInt32 | m_nXItems |
| XnInt32 | m_nYItems |
| XnBool | m_bValueChangeOnOffAxis |
| XnFloat | m_fSliderSizeX |
| XnFloat | m_fSliderSizeY |
| XnFloat | m_fBorderWidth |
| XnVSlider2D * | m_pSlider |
| XnVMultiItemHysteresis2D * | m_pHysteresis |
| XnVBorderScrollController2D * | m_pScroller |
| XnBool | m_bInOffAxis |
| XnVSlider1D * | m_pSecondarySlider |
| XnVMultiItemHysteresis1D * | m_pOffAxisHysteresis |
| XnPoint3D | m_ptCenter |
| XnInt32 | m_nXLastHover |
| XnInt32 | m_nYLastHover |
| XnCallbackHandle | m_hHysteresisItemSelect |
| XnCallbackHandle | m_hScrollerScroll |
| XnCallbackHandle | m_hSliderValueChange |
| XnCallbackHandle | m_hSliderOffAxis |
| XnCallbackHandle | m_hOffAxisHysteresisItemSelect |
| XnCallbackHandle | m_hSecondarySliderValueChange |
| XnCallbackHandle | m_hSecondarySliderOffAxis |
| XnVIntIntSpecificEvent * | m_pItemHoverCBs |
| XnVFloatFloatSpecificEvent * | m_pScrollCBs |
| XnVFloatFloatSpecificEvent * | m_pValueChangeCBs |
| XnVItemSelectSpecificEvent * | m_pItemSelectCBs |
| XnVDirectionSpecificEvent * | m_pOffAxisMovementCBs |
Static Protected Attributes | |
| static const XnFloat | ms_fSecondarySliderSize |
A Selectable slider 2D is a 2D slider (on the x/y plane) with a number of cells and borders in both axis, where the items can be selected by moving off axis (in the z axis).
Item (0,0) is the bottom-left one.
Definition at line 34 of file XnVSelectableSlider2D.h.
| typedef void(XN_CALLBACK_TYPE * XnVSelectableSlider2D::ItemHoverCB)(XnInt32 nXIndex, XnInt32 nYIndex, void *pUserCxt) |
Type for hover event callback. Receives the 2 indices of the hovered item
Definition at line 41 of file XnVSelectableSlider2D.h.
| typedef void(XN_CALLBACK_TYPE * XnVSelectableSlider2D::ItemSelectCB)(XnInt32 nXIndex, XnInt32 nYIndex, XnVDirection eDir, void *pUserCxt) |
Type for select event callback. Receives the 2 indices of the selected item and the direction of the selection.
Definition at line 45 of file XnVSelectableSlider2D.h.
| typedef void(XN_CALLBACK_TYPE * XnVSelectableSlider2D::OffAxisMovementCB)(XnVDirection eDir, void *pUserCxt) |
Type for off axis event callback. Receives the direction of the off axis movement
Definition at line 49 of file XnVSelectableSlider2D.h.
| typedef void(XN_CALLBACK_TYPE * XnVSelectableSlider2D::ScrollCB)(XnFloat fXValue, XnFloat fYValue, void *pUserCxt) |
Type for scroll event callback. Receives the number between -1 and 1 in each axis, indicating where in the border the point is
Definition at line 59 of file XnVSelectableSlider2D.h.
| typedef void(XN_CALLBACK_TYPE * XnVSelectableSlider2D::ValueChangeCB)(XnFloat fXValue, XnFloat fYValue, void *pUserCxt) |
Type for value change event callback. Receives a number between 0 and 1 for each axis, indicating where in the slider the point is
Definition at line 54 of file XnVSelectableSlider2D.h.
| XnVSelectableSlider2D::XnVSelectableSlider2D | ( | XnInt32 | nXItems, | |
| XnInt32 | nYItems, | |||
| XnFloat | fSliderSizeX = ms_fDefaultSliderSize, |
|||
| XnFloat | fSliderSizeY = ms_fDefaultSliderSize, |
|||
| XnFloat | fBorderWidth = 0, |
|||
| const XnChar * | strName = "XnVSelectableSlider2D" | |||
| ) |
Creation. Gets the number of items in each axis for the slider, the width of the border (on all sides), its axis, and more.
| [in] | nXItems | Number of item rows in the slider |
| [in] | nYItems | Number of item columns in the slider |
| [in] | fSliderSizeX | Size of the slider in the x-coordinate (in mm) |
| [in] | fSliderSizeY | Size of the slider in the y-coordinate (in mm) |
| [in] | fBorderWidth | Size reserved from the slider for scrolling |
| [in] | strName | Name of the control, for log purposes. |
| virtual XnVSelectableSlider2D::~XnVSelectableSlider2D | ( | ) | [virtual] |
| XnFloat XnVSelectableSlider2D::GetBorderWidth | ( | ) | const |
Get the current border width
| void XnVSelectableSlider2D::GetCenter | ( | XnPoint3D & | ptCenter | ) | const |
| XnFloat XnVSelectableSlider2D::GetHysteresisRatio | ( | ) | const |
Get current hysteresis ratio
| XnUInt32 XnVSelectableSlider2D::GetItemXCount | ( | ) | const |
Get the current number of item rows
| XnUInt32 XnVSelectableSlider2D::GetItemYCount | ( | ) | const |
Get the current number of item columns
| void XnVSelectableSlider2D::GetSliderSize | ( | XnFloat & | fSliderXSize, | |
| XnFloat & | fSliderYSize | |||
| ) | const |
Get the slider sizes
| [out] | fSliderXSize | The size of the X-Slider |
| [out] | fSliderYSize | The size of the Y-Slider |
| XnBool XnVSelectableSlider2D::GetValueChangeOnOffAxis | ( | ) | const |
Get current behavior
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::Hysteresis_ItemSelected | ( | XnInt32 | nXItem, | |
| XnInt32 | nYItem, | |||
| void * | pContext | |||
| ) | [static, protected] |
| void XnVSelectableSlider2D::ItemHover | ( | XnInt32 | nXIndex, | |
| XnInt32 | nYIndex | |||
| ) | [protected] |
| void XnVSelectableSlider2D::ItemSelect | ( | XnVDirection | eDir | ) | [protected] |
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::OffAxisHysteresis_ItemSelected | ( | XnInt32 | nItem, | |
| void * | cxt | |||
| ) | [static, protected] |
| void XnVSelectableSlider2D::OffAxisMovement | ( | XnVDirection | eDir | ) | [protected] |
| void XnVSelectableSlider2D::OnPrimaryPointCreate | ( | const XnVHandPointContext * | pContext, | |
| const XnPoint3D & | ptFocus | |||
| ) | [virtual] |
Called when the primary point is created.
| [in] | pContext | The hand context of the newly created primary point |
| [in] | ptFocus | The point in which the session has started. |
Reimplemented from XnVPointControl.
| void XnVSelectableSlider2D::OnPrimaryPointDestroy | ( | XnUInt32 | nID | ) | [virtual] |
Called when the primary point is destroyed.
| [in] | nID | the ID of the last primary point |
Reimplemented from XnVPointControl.
| void XnVSelectableSlider2D::OnPrimaryPointUpdate | ( | const XnVHandPointContext * | pContext | ) | [virtual] |
Called when the primary point is updated. This will cause the algorithm to manage the slider.
| [in] | pContext | The hand context of the updated primary point |
Reimplemented from XnVPointControl.
| void XnVSelectableSlider2D::PointDeleted | ( | XnBool | bReason | ) | [protected] |
| void XnVSelectableSlider2D::PointMoved | ( | const XnPoint3D & | pt, | |
| XnFloat | fTime | |||
| ) | [protected] |
| XnCallbackHandle XnVSelectableSlider2D::RegisterItemHover | ( | void * | cxt, | |
| ItemHoverCB | CB | |||
| ) |
Register for the hover event
| [in] | cxt | User's context |
| [in] | CB | The Callback to call when the event is invoked. |
| XnCallbackHandle XnVSelectableSlider2D::RegisterItemSelect | ( | void * | cxt, | |
| ItemSelectCB | CB | |||
| ) |
Register for the selection event
| [in] | cxt | User's context |
| [in] | CB | The Callback to call when the event is invoked. |
| XnCallbackHandle XnVSelectableSlider2D::RegisterOffAxisMovement | ( | void * | cxt, | |
| OffAxisMovementCB | CB | |||
| ) |
Register for the off-axis event
| [in] | cxt | User's context |
| [in] | CB | The Callback to call when the event is invoked. |
| XnCallbackHandle XnVSelectableSlider2D::RegisterScroll | ( | void * | cxt, | |
| ScrollCB | CB | |||
| ) |
Register for the scroll event
| [in] | cxt | User's context |
| [in] | CB | The Callback to call when the event is invoked. |
| XnCallbackHandle XnVSelectableSlider2D::RegisterValueChange | ( | void * | cxt, | |
| ValueChangeCB | CB | |||
| ) |
Register for the value change event
| [in] | cxt | User's context |
| [in] | CB | The Callback to call when the event is invoked. |
| void XnVSelectableSlider2D::Reposition | ( | const XnPoint3D & | ptCenter | ) |
Reposition the slider
| [in] | ptCenter | The new center point for the slider. |
| void XnVSelectableSlider2D::Scroll | ( | XnFloat | fXValue, | |
| XnFloat | fYValue | |||
| ) | [protected] |
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::Scroller2D_Scrolled | ( | XnFloat | fXValue, | |
| XnFloat | fYValue, | |||
| void * | pContext | |||
| ) | [static, protected] |
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::SecondarySlider_OffAxisMovement | ( | XnVDirection | eDir, | |
| void * | cxt | |||
| ) | [static, protected] |
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::SecondarySlider_ValueChange | ( | XnFloat | fValue, | |
| void * | cxt | |||
| ) | [static, protected] |
| XnStatus XnVSelectableSlider2D::SetBorderWidth | ( | XnFloat | fWidth | ) |
Change the border width
| [in] | fWidth | New border width |
| void XnVSelectableSlider2D::SetHysteresisRatio | ( | XnFloat | fRatio | ) |
Change the hysteresis ratio, to pass from one item to another. Units are the width of the cell.
| [in] | fRatio | The new hysteresis ratio. 0 means no ratio, 0.5 means additional half width |
| void XnVSelectableSlider2D::SetItemCount | ( | XnUInt32 | nItemXCount, | |
| XnUInt32 | nItemYCount | |||
| ) |
Change the current number of items rows and columns
| [in] | nItemXCount | New number of rows |
| [in] | nItemYCount | New number of columns |
| void XnVSelectableSlider2D::SetItemXCount | ( | XnUInt32 | nItemXCount | ) |
Change the current number of items rows
| [in] | nItemXCount | New number of rows |
| void XnVSelectableSlider2D::SetItemYCount | ( | XnUInt32 | nItemYCount | ) |
Change the current number of items columns
| [in] | nItemYCount | New number of columns |
| void XnVSelectableSlider2D::SetSliderSize | ( | XnFloat | fSliderXSize, | |
| XnFloat | fSliderYSize | |||
| ) |
Change the slider sizes
| [in] | fSliderXSize | The new size of the X-Slider |
| [in] | fSliderYSize | The new size of the Y-Slider |
| void XnVSelectableSlider2D::SetValueChangeOnOffAxis | ( | XnBool | bReport | ) |
Change behavior: Should the SelectableSlider keep sending ValueChange events when checking OffAxis
| [in] | bReport | New mode. default is off |
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::Slider_OffAxis | ( | XnVDirection | eDir, | |
| void * | cxt | |||
| ) | [static, protected] |
| static void XN_CALLBACK_TYPE XnVSelectableSlider2D::Slider_ValueChange | ( | XnFloat | fXValue, | |
| XnFloat | fYValue, | |||
| void * | pContext | |||
| ) | [static, protected] |
| void XnVSelectableSlider2D::UnregisterItemHover | ( | XnCallbackHandle | hCB | ) |
Unregister from the hover event
| [in] | hCB | The handle provided on registration. |
| void XnVSelectableSlider2D::UnregisterItemSelect | ( | XnCallbackHandle | hCB | ) |
Unregister from the selection event
| [in] | hCB | The handle provided on registration. |
| void XnVSelectableSlider2D::UnregisterOffAxisMovement | ( | XnCallbackHandle | hCB | ) |
Unregister from the off-axis event
| [in] | hCB | The handle provided on registration. |
| void XnVSelectableSlider2D::UnregisterScroll | ( | XnCallbackHandle | hCB | ) |
Unregister from the scroll event
| [in] | hCB | The handle provided on registration. |
| void XnVSelectableSlider2D::UnregisterValueChange | ( | XnCallbackHandle | hCB | ) |
Unregister from the value change event
| [in] | hCB | The handle provided on registration. |
| void XnVSelectableSlider2D::UpdateSlider | ( | XnFloat | fXValue, | |
| XnFloat | fYValue | |||
| ) | [protected] |
| void XnVSelectableSlider2D::ValueChange | ( | XnFloat | fXValue, | |
| XnFloat | fYValue | |||
| ) | [protected] |
XnBool XnVSelectableSlider2D::m_bInOffAxis [protected] |
Definition at line 306 of file XnVSelectableSlider2D.h.
XnBool XnVSelectableSlider2D::m_bPositioned [protected] |
Definition at line 294 of file XnVSelectableSlider2D.h.
XnBool XnVSelectableSlider2D::m_bValueChangeOnOffAxis [protected] |
Definition at line 297 of file XnVSelectableSlider2D.h.
XnBool XnVSelectableSlider2D::m_bValueChangeWithoutBorders [protected] |
Definition at line 292 of file XnVSelectableSlider2D.h.
XnFloat XnVSelectableSlider2D::m_fBorderWidth [protected] |
Definition at line 301 of file XnVSelectableSlider2D.h.
XnFloat XnVSelectableSlider2D::m_fSliderSizeX [protected] |
Definition at line 299 of file XnVSelectableSlider2D.h.
XnFloat XnVSelectableSlider2D::m_fSliderSizeY [protected] |
Definition at line 300 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hHysteresisItemSelect [protected] |
Definition at line 314 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hOffAxisHysteresisItemSelect [protected] |
Definition at line 319 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hScrollerScroll [protected] |
Definition at line 315 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hSecondarySliderOffAxis [protected] |
Definition at line 321 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hSecondarySliderValueChange [protected] |
Definition at line 320 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hSliderOffAxis [protected] |
Definition at line 317 of file XnVSelectableSlider2D.h.
XnCallbackHandle XnVSelectableSlider2D::m_hSliderValueChange [protected] |
Definition at line 316 of file XnVSelectableSlider2D.h.
XnInt32 XnVSelectableSlider2D::m_nXItems [protected] |
Definition at line 295 of file XnVSelectableSlider2D.h.
XnInt32 XnVSelectableSlider2D::m_nXLastHover [protected] |
Definition at line 312 of file XnVSelectableSlider2D.h.
XnInt32 XnVSelectableSlider2D::m_nYItems [protected] |
Definition at line 295 of file XnVSelectableSlider2D.h.
XnInt32 XnVSelectableSlider2D::m_nYLastHover [protected] |
Definition at line 312 of file XnVSelectableSlider2D.h.
Definition at line 303 of file XnVSelectableSlider2D.h.
XnVIntIntSpecificEvent* XnVSelectableSlider2D::m_pItemHoverCBs [protected] |
Definition at line 323 of file XnVSelectableSlider2D.h.
XnVItemSelectSpecificEvent* XnVSelectableSlider2D::m_pItemSelectCBs [protected] |
Definition at line 326 of file XnVSelectableSlider2D.h.
Definition at line 308 of file XnVSelectableSlider2D.h.
XnVDirectionSpecificEvent* XnVSelectableSlider2D::m_pOffAxisMovementCBs [protected] |
Definition at line 327 of file XnVSelectableSlider2D.h.
XnVFloatFloatSpecificEvent* XnVSelectableSlider2D::m_pScrollCBs [protected] |
Definition at line 324 of file XnVSelectableSlider2D.h.
XnVBorderScrollController2D* XnVSelectableSlider2D::m_pScroller [protected] |
Definition at line 304 of file XnVSelectableSlider2D.h.
XnVSlider1D* XnVSelectableSlider2D::m_pSecondarySlider [protected] |
Definition at line 307 of file XnVSelectableSlider2D.h.
XnVSlider2D* XnVSelectableSlider2D::m_pSlider [protected] |
Definition at line 302 of file XnVSelectableSlider2D.h.
XnPoint3D XnVSelectableSlider2D::m_ptCenter [protected] |
Definition at line 310 of file XnVSelectableSlider2D.h.
XnVFloatFloatSpecificEvent* XnVSelectableSlider2D::m_pValueChangeCBs [protected] |
Definition at line 325 of file XnVSelectableSlider2D.h.
const XnFloat XnVSelectableSlider2D::ms_fDefaultSliderSize [static] |
Definition at line 175 of file XnVSelectableSlider2D.h.
const XnFloat XnVSelectableSlider2D::ms_fSecondarySliderSize [static, protected] |
Definition at line 291 of file XnVSelectableSlider2D.h.
1.7.1