xn::AlternativeViewPointCapability Class Reference
C++ Reference to Application Programmer Interface (API) » Production Nodes Functionality

`#include <XnCppWrapper.h>`

Inheritance diagram for xn::AlternativeViewPointCapability:
[legend]

## 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)
Public Member Functions inherited from xn::Capability
| Capability (XnNodeHandle hNode)
| Capability (const NodeWrapper &node)
Public Member Functions inherited from xn::NodeWrapper
| NodeWrapper (XnNodeHandle hNode)
| NodeWrapper (const NodeWrapper &other)
NodeWrapper & | operator= (const NodeWrapper &other)
| ~NodeWrapper ()
| operator XnNodeHandle () const
XnNodeHandle | GetHandle () const
XnBool | operator== (const NodeWrapper &other)
XnBool | operator!= (const NodeWrapper &other)
XnBool | IsValid () const
const XnChar * | GetName () const
XnStatus | AddRef ()
void | Release ()
void | SetHandle (XnNodeHandle hNode)
void | TakeOwnership (XnNodeHandle hNode)

## 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

## AlternativeViewPointCapability() [1/2]

xn::AlternativeViewPointCapability::AlternativeViewPointCapability | ( | XnNodeHandle | hNode | ) |

inline

## AlternativeViewPointCapability() [2/2]

xn::AlternativeViewPointCapability::AlternativeViewPointCapability | ( | const NodeWrapper & | node | ) |

inline

## Member Function Documentation

## IsViewPointAs()

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] | otherNode | Other node, whose viewpoint is used for comparison with the viewpoint of this node.

## IsViewPointSupported()

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] | otherNode | Other 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.

## RegisterToViewPointChange()

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] | handler | Callback function to be invoked when the event is raised.
  [in] | pCookie | User's cookie, to be delivered to the callback.
  [out] | hCallback | Handle to the callback to be used for unregistering it.

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

## ResetViewPoint()

XnStatus xn::AlternativeViewPointCapability::ResetViewPoint | ( |  | ) |

inline

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

## SetViewPoint()

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] | otherNode | Viewpoint to be set.

## UnregisterFromViewPointChange()

void xn::AlternativeViewPointCapability::UnregisterFromViewPointChange | ( | XnCallbackHandle | hCallback | ) |

inline

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

Parameters

  [in] | hCallback | Handle 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:

- XnCppWrapper.h