Bone rotation computation

The initial orientation of bones in space is specified in the T-Pose. Then, the skeletal model bones orientations are optimized based on the three-dimensional positions of the joints: IK + the algorithm, which is a part of IP.
The interpretation of the bone orientations returned in the Nuitrack API is given in this post.