bool trackingSucceeded = this.volume.AlignDepthFloatToReconstruction(
                    depthFloatBuffer,
                    12,
                    residualFloatBuffer,
                    out _alignmentEnergy,
                    world_to_camera);
           
            if (!trackingSucceeded || _alignmentEnergy > 0.1)
            {
                //forget about the frame we just set
                volume.SetAlignDepthFloatToReconstructionReferenceFrame(_oldDepthFloatBuffer);
                if (!trackingSucceeded)
                {
                    this.trackingErrorCount++;
                }
                FusionStatusMessage = Numerisation.Properties.Resources.CameraTrackingFailed;
                _audioManager.State = AudioState.Error;
            }
            else
            {
                FusionDepthProcessor.DepthToDepthFloatFrame(
                depthPixels,
                (int)depthSize.Width,
                (int)depthSize.Height,
                _oldDepthFloatBuffer,
                FusionDepthProcessor.DefaultMinimumDepth,
                FusionDepthProcessor.DefaultMaximumDepth,
                false);
     }

//Init FbxManager
_sdkManager = FbxManager::Create();

// Create a new scene so that it can be populated by the imported file.
_scene = FbxScene::Create(_sdkManager, "FbxScene");
_mesh = FbxMesh::Create(_sdkManager, "myMesh");

//prepare normals (depth vector for light sources and curves)
_normalsLayer = _mesh->CreateElementNormal();
_normalsLayer->SetMappingMode(FbxLayerElement::eByControlPoint);
_normalsLayer->SetReferenceMode(FbxLayerElement::eDirect);

//prepare color vertex layer
_colorLayer = _mesh->CreateElementVertexColor();
_colorLayer->SetMappingMode(FbxLayerElement::eByControlPoint);
_colorLayer->SetReferenceMode(FbxLayerElement::eDirect);

_uvLayer = _mesh->CreateElementUV("DiffuseUv");
_uvLayer->SetMappingMode(FbxLayerElement::eByPolygonVertex);
_uvLayer->SetReferenceMode(FbxLayerElement::eIndexToDirect);

/// <param name="pNode">Node in the armature.</param>
/// <param name="toFind">Name of the bone.</param>

float	FBXParser::PrintNode(FbxNode* pNode, const std::string & toFind) 
{
	FbxSkeleton* lSkeleton = (FbxSkeleton*) pNode->GetNodeAttribute();
	std::string nodeName = pNode->GetName();

	// Print the node's attributes.
	if (nodeName.compare(toFind) == 0)
	{
		// In the .FBX file, contains the size of the bone in centimeters
		found = lSkeleton->Size.Get();
		return found;
	}

	// Recursively look for the children the children.
	for(int j = 0; j < pNode->GetChildCount(); j++)
		PrintNode(pNode->GetChild(j), toFind);
	return found;
}

protected void BuildJointHierarchy()
{
if (null == this.nuiJointToAvatarBoneIndex)
{
this.nuiJointToAvatarBoneIndex = new Dictionary<JointType, int>();
}
            // Add(Kinect joint, Model Joint)
            this.nuiJointToAvatarBoneIndex.Add(JointType.HipCenter, 1);
           [...]
            this.nuiJointToAvatarBoneIndex.Add(JointType.FootRight, 56);
        }

namespace WPFGame
{
    class GameViewModel
    {
        private KinectSensor sensor;
        private APIKinect.APIKinectBase api;
        private System.Collections.Generic.Dictionary<string, Database.Session.structOutfit> dictionaryClothes;

        public GameViewModel(KinectSensor sensor, APIKinect.APIKinectBase api, System.Collections.Generic.Dictionary<string, Database.Session.structOutfit> dictionaryClothes)
        {
            Game = new Microsoft.Samples.Kinect.Projection.Projection(sensor, api, dictionaryClothes);
        }

        public Microsoft.Samples.Kinect.Projection.Projection Game { get; private set; }

    }
}