OpenNI 1.5.4: xn::AlternativeViewPointCapability Class Reference

OpenNI

xn::AlternativeViewPointCapability Class Reference

#include <XnCppWrapper.h>

Inheritance diagram for xn::AlternativeViewPointCapability:

List of all members.

Public Member Functions

 AlternativeViewPointCapability (XnNodeHandle hNode)
 AlternativeViewPointCapability (const NodeWrapper &node)
XnBool IsViewPointSupported (ProductionNode &otherNode) const
XnStatus SetViewPoint (ProductionNode &otherNode)
XnStatus ResetViewPoint ()
XnBool IsViewPointAs (ProductionNode &otherNode) const
XnStatus RegisterToViewPointChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
void UnregisterFromViewPointChange (XnCallbackHandle hCallback)

Detailed Description

Purpose: The AlternativeViewPoint capability enables any type of map generator (depth, image, or IR) to transform its data to appear as if the sensor is placed in another location. The other location is represented by a second production node, usually representing another sensor.

Usage: Do not instantiate directly. Instead, use Generator::GetAlternativeViewPointCap() to obtain an instance.

Remarks:

This capability provides a solution for the situation where you want to impose color over depth, but there is then the problem that the two sensing media (transducers) are looking in slightly different directions. This capability superimposes the two sensing media of one sensor.

Other uses are also possible.

Note:
The AlternativeViewPoint capability has nothing to do with the actual physical position of a sensor. You could move the location of the sensor itself, but this will not change the current viewpoint.

Event: 'Viewpoint Change'

Signals that the holder node's viewpoint has changed (also see Configuration Change Events).

Use RegisterToViewPointChange() and UnregisterFromViewPointChange() for using this event.

Calling the SetViewPoint() or ResetViewPoint() methods raises this event.


Constructor & Destructor Documentation

xn::AlternativeViewPointCapability::AlternativeViewPointCapability ( XnNodeHandle  hNode) [inline]
xn::AlternativeViewPointCapability::AlternativeViewPointCapability ( const NodeWrapper node) [inline]

Member Function Documentation

XnBool xn::AlternativeViewPointCapability::IsViewPointAs ( ProductionNode otherNode) const [inline]

Returns whether the holder node's viewpoint is the same viewpoint as that of another specified node. Thus, this method is somewhat of an equality operator.

Parameters:
[in]otherNodeOther node, whose viewpoint is used for comparison with the viewpoint of this node.
XnBool xn::AlternativeViewPointCapability::IsViewPointSupported ( ProductionNode otherNode) const [inline]

Checks if the generator node holding this capability can change its output to appear as if the sensor was placed at the viewpoint of another specific production node.

Parameters:
[in]otherNodeOther production node, whose viewpoint against which this node's viewpoint is being checked.

Remarks

This is not the same as xn::ProductionNode::IsCapabilitySupported(). Although the node implementation supports this capability, it may nevertheless support only the viewpoints of nodes of some specific sensors and not of other specific sensors.

XnStatus xn::AlternativeViewPointCapability::RegisterToViewPointChange ( StateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
) [inline]

Registers a handler for the 'Viewpoint Change' event (see the above overview to this class).

Parameters:
[in]handlerCallback function to be invoked when the event is raised.
[in]pCookieUser's cookie, to be delivered to the callback.
[out]hCallbackHandle to the callback to be used for unregistering it.

For full details and usage of the parameters, see Registering to Events.

XnStatus xn::AlternativeViewPointCapability::ResetViewPoint ( ) [inline]

Sets the viewpoint of the holding generator node to its normal viewpoint.

XnStatus xn::AlternativeViewPointCapability::SetViewPoint ( ProductionNode otherNode) [inline]

Sets the current viewpoint of the holding generator node to look as if it is placed at a different generator location. All further generated output will appear as if the sensor was placed at the different location.

Parameters:
[in]otherNodeViewpoint to be set.
void xn::AlternativeViewPointCapability::UnregisterFromViewPointChange ( XnCallbackHandle  hCallback) [inline]

Unregisters the event handler for the the 'Viewpoint Change' event.

Parameters:
[in]hCallbackHandle received from registration.

For full details and usage of the parameter, see Unregistering from Events .


The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:07 for OpenNI 1.5.4 by   doxygen 1.7.5.1