INuiFusionReconstruction::GetCurrentWorldToVolumeTransform Method

Get the current internal world-to-volume transform.

Syntax

public:
HRESULT GetCurrentWorldToVolumeTransform(
         Matrix4 *pWorldToVolumeTransform
)

Parameters

  • pWorldToVolumeTransform
    Type: Matrix4
    A pointer to a pre-allocated Matrix 4, to be filled with a similarity transformation that converts world coordinates to reconstruction volume coordinates. This transform expresses the location and orientation of the world coordinate system origin in volume coordinates and the scaling of the world coordinates to volume indices.

    Note: A right handed volume coordinate system is used, with the origin of the volume (i.e. voxel 0,0,0) at the top left of the front plane of the cube. Similar to bitmap images with top left origin, +X is to the right, +Y down, and +Z is forward from origin into the reconstruction volume. The default transform is a combination of translation in X,Y to locate the world origin at the center of the front face of the reconstruction volume cube, and scaling by the voxelsPerMeter reconstruction parameter to convert from world coordinate system to volume voxel indices.

Return Value

Type: HRESULT
Returns S_OK if successful; otherwise, returns one of the following error codes:

Error code Description
E_POINTER

The pWorldToVolumeTransform parameter is NULL.

E_FAIL The call failed for an unknown reason.

Requirements

Header: Declared in nuikinectfusionvolume.h.

Library: Use KinectFusion170_32.lib or KinectFusion170_64.lib, depending on the bitness of the target system being compiled..