NITE 1.5.1 - API Reference

XnVSlider3D Class Reference

#include <XnVSlider3D.h>

List of all members.

Public Types

typedef void(XN_CALLBACK_TYPE * ValueChangeCB )(XnFloat fXValue, XnFloat fYValue, XnFloat fZValue, void *pUserCxt)

Public Member Functions

 XnVSlider3D (const XnPoint3D &ptMin, const XnPoint3D &ptMax)
 ~XnVSlider3D ()
XnStatus Update (const XnPoint3D &pt)
XnCallbackHandle RegisterValueChange (void *cxt, ValueChangeCB CB)
void UnregisterValueChange (XnCallbackHandle hCB)

Protected Member Functions

void ValueChange (XnFloat fXValue, XnFloat fYValue, XnFloat fZValue)

Protected Attributes

XnPoint3D m_ptMin
XnPoint3D m_ptMax
XnFloat m_fSizeX
XnFloat m_fSizeY
XnFloat m_fSizeZ
XnVValueChange3DSpecificEvent * m_pValueChangeCBs

Detailed Description

This is a simple 3D slider. It receives a point, and normalizes it in the 3D space to numbers between 0 and 1 for each axis. The XnVSlider2D defines one event:

  • Its values have changed

Definition at line 22 of file XnVSlider3D.h.


Member Typedef Documentation

typedef void(XN_CALLBACK_TYPE * XnVSlider3D::ValueChangeCB)(XnFloat fXValue, XnFloat fYValue, XnFloat fZValue, void *pUserCxt)

Type for the value change event callback. The values are between 0 and 1.

Definition at line 28 of file XnVSlider3D.h.


Constructor & Destructor Documentation

XnVSlider3D::XnVSlider3D ( const XnPoint3D &  ptMin,
const XnPoint3D &  ptMax 
)

Creation. It receives 2 points, defining the 3D space.

XnVSlider3D::~XnVSlider3D ( )

Member Function Documentation

XnCallbackHandle XnVSlider3D::RegisterValueChange ( void *  cxt,
ValueChangeCB  CB 
)

Register for the value change event

Parameters:
[in]cxtUser's context
[in]CBThe Callback to call when the event is invoked.
Returns:
A handle, to allow unregistration.
void XnVSlider3D::UnregisterValueChange ( XnCallbackHandle  hCB)

Unregister from the value change event

Parameters:
[in]hCBThe handle provided on registration.
XnStatus XnVSlider3D::Update ( const XnPoint3D &  pt)

The main function. It receives a point, normalizes it, and calculates the new values.

Parameters:
[in]ptThe point to check in the slider.
void XnVSlider3D::ValueChange ( XnFloat  fXValue,
XnFloat  fYValue,
XnFloat  fZValue 
) [protected]

Member Data Documentation

XnFloat XnVSlider3D::m_fSizeX [protected]

Definition at line 64 of file XnVSlider3D.h.

XnFloat XnVSlider3D::m_fSizeY [protected]

Definition at line 64 of file XnVSlider3D.h.

XnFloat XnVSlider3D::m_fSizeZ [protected]

Definition at line 64 of file XnVSlider3D.h.

XnPoint3D XnVSlider3D::m_ptMax [protected]

Definition at line 63 of file XnVSlider3D.h.

XnPoint3D XnVSlider3D::m_ptMin [protected]

Definition at line 63 of file XnVSlider3D.h.

XnVValueChange3DSpecificEvent* XnVSlider3D::m_pValueChangeCBs [protected]

Definition at line 66 of file XnVSlider3D.h.


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