OpenNI 1.5.4: xn::MirrorCapability Class Reference

OpenNI

xn::MirrorCapability Class Reference

#include <XnCppWrapper.h>

Inheritance diagram for xn::MirrorCapability:

List of all members.

Public Member Functions

 MirrorCapability (XnNodeHandle hNode)
 MirrorCapability (const NodeWrapper &node)
XnStatus SetMirror (XnBool bMirror)
XnBool IsMirrored () const
XnStatus RegisterToMirrorChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
void UnregisterFromMirrorChange (XnCallbackHandle hCallback)

Detailed Description

Purpose: Applying the MirrorCapability to a node allows enabling the Mirroring mode on a per node basis. Compare this with enabling the Global Mirror, which applies mirroring to any node supporting the Mirroring capability. To understand mirroring see the Overview below.

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

Remarks:

When you stand facing the sensor device, and the image is processed directly, the sensor "sees" your left hand at your right-hand side, and your right hand at your left-hand side.

If your movements are used to control an avatar, and that avatar is facing you then the avatar on the screen is opposite: your right hand is facing the left of the avatar on the screen, and your left hand is facing the right of the avatar.

The effect of applying and enabling the Mirroring capability on a node makes all the data replace right with left, and left with right.

Thus, if mirroring is disabled (default), then when you raise your right hand, the avatar on the screen opposite you correspondingly also raises its own right hand, this being to the left of yourself.

If mirroring is enabled, when you raise your right hand on the screen the avatar opposite you mirrors you by raising its hand on your right, which is the avatar's left hand.

Enabling mirroring is useful when the avatar is facing the player. Disabling mirroring is useful when the player sees the avatar from behind (for example in third person shooters or to see yourself kicking a football).

Changing the GlobalMirror flag affects mirroring in all existing nodes and in all nodes to be created in the future - see Context::SetGlobalMirror().

Event: 'Mirror Change'

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

Use RegisterToMirrorChange() and UnregisterFromMirrorChange() for using this event.

Calling the SetMirror() method raises this event.


Constructor & Destructor Documentation

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

Member Function Documentation

XnBool xn::MirrorCapability::IsMirrored ( ) const [inline]

Gets the current mirroring configuration of the holder node. This configuration is used for generating the next frame.

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

Registers an event handler for the 'Mirror Change' event.

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::MirrorCapability::SetMirror ( XnBool  bMirror) [inline]

Sets the current mirror configuration of the holder node, enabling or disabling mirroring. This configuration is used for generating the next frame.

Parameters:
[in]bMirrorTRUE for mirroring output, FALSE otherwise.
void xn::MirrorCapability::UnregisterFromMirrorChange ( XnCallbackHandle  hCallback) [inline]

Unregisters the event handler for the 'Mirror 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