在c ++中进行攻击? [英] Avateering in c++?

查看:140
本文介绍了在c ++中进行攻击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi msn guys,

hi msn guys,

是否有机会获得Avateering  c ++中的例子?

is there a chance to get Avateering  example in c++?

如果没有,有人可以给我一个评论的代码片段 如何在简单变量中获取骨骼的旋转,例如left_arm_rot_x,eft_arm_rot_y,eft_arm_rot_z。

if not, can some one give me a commented code piece  how to get rotations of a bone in simple variables, like left_arm_rot_x, eft_arm_rot_y, eft_arm_rot_z.

提前感谢

推荐答案

这个的C ++ API是NuiSkeletonCalculateBoneOrientations.You传递一个骨架和一个NUI_SKELETON_BONE_ORIENTATION数组,它填充它在数组中。

The C++ API for this is NuiSkeletonCalculateBoneOrientations.You pass it a skeleton and an array of NUI_SKELETON_BONE_ORIENTATION, and it fills in the array.

在两个不同的参照系中提供的每个骨骼的旋转:分层(相对于骨架中的"父"骨骼)和绝对(相对于摄像机) )。这些旋转中的每一个都以两种表示形式表示:4x4旋转矩阵,
和四元数。骨骼的末端处的骨骼被"最远"的骨头索引。从中央髋关节。例如,要获得左上臂的骨骼,请使用左肘的索引。

The rotations for each bone provided in two different frames of reference: hierarchical (relative to the "parent" bone in the skeleton), and absolute (relative to the camera). Each of these rotations is expressed in two representations: a 4x4 rotation matrix, and a quaternion. Bones are indexed by the joint at the end of the bone that is "furthest" from the center hip joint. For example, to get the bone for the left upper arm, use the index of the left elbow.

NUI_SKELETON_BONE_ORIENTATION boneOrientations [NUI_SKELETON_POSITION_COUNT];

NuiSkeletonCalculateBoneOrientations(& skeletonData,& boneOrientations);
$
NUI_SKELETON_BONE_ORIENTATION& leftUpperArm = boneOrientations [NUI_SKELETON_POSITION_ELBOW_LEFT];

NUI_SKELETON_BONE_ORIENTATION boneOrientations[NUI_SKELETON_POSITION_COUNT];
NuiSkeletonCalculateBoneOrientations(&skeletonData, &boneOrientations);
NUI_SKELETON_BONE_ORIENTATION& leftUpperArm = boneOrientations[NUI_SKELETON_POSITION_ELBOW_LEFT];

对于左上臂的旋转,您可以使用以下表达式之一访问旋转信息:

For the rotation of the upper left arm, you can access the rotation info using one of the following expressions:

leftUpperArm.hierarchicalRotation.rotationMatrix

leftUpperArm.hierarchicalRotation.rotationQuaternion

leftUpperArm.absoluteRotation.rotationMatrix

leftUpperArm.absoluteRotation.rotationQuaternion

leftUpperArm.hierarchicalRotation.rotationMatrix
leftUpperArm.hierarchicalRotation.rotationQuaternion
leftUpperArm.absoluteRotation.rotationMatrix
leftUpperArm.absoluteRotation.rotationQuaternion

John

K4W Dev

John
K4W Dev


这篇关于在c ++中进行攻击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆