当前位置: 首页>>代码示例>>C#>>正文


C# Windows.Kinect.ToString方法代码示例

本文整理汇总了C#中Windows.Kinect.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Windows.Kinect.ToString方法的具体用法?C# Windows.Kinect.ToString怎么用?C# Windows.Kinect.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Windows.Kinect的用法示例。


在下文中一共展示了Windows.Kinect.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RotateBone

    private void RotateBone(GameObject bodyObject, Kinect.JointType startBone, Kinect.JointType endBone)
    {
        GameObject avatarJoint = GameObject.FindGameObjectsWithTag (startBone.ToString ()) [0];
        Transform jointObj = bodyObject.transform.FindChild (startBone.ToString ());
        Transform targetJointObj = bodyObject.transform.FindChild (endBone.ToString ());

        Quaternion avatarRotaion = Quaternion.LookRotation ((targetJointObj.transform.position - jointObj.transform.position).normalized);
        avatarJoint.transform.rotation = Quaternion.Slerp (avatarJoint.transform.rotation, avatarRotaion, Time.deltaTime * 2000);
        avatarJoint.transform.Rotate (new Vector3 (90, 0, 0));
    }
开发者ID:sharifshahnewaz,项目名称:Balance-Game-Reference,代码行数:10,代码来源:BodySourceView.cs

示例2: addBone

 private GameObject addBone(string name, float radius, GameObject prefab, Transform body, Kinect.JointType joint1, Kinect.JointType? joint2 = null)
 {
     GameObject bone = (GameObject) Instantiate(prefab, Vector3.zero, Quaternion.identity);
     bone.name = name; bone.transform.parent = body;
     BoneScript script = bone.GetComponent("BoneScript") as BoneScript;
     script.radius = radius;
     script.joint1 = body.FindChild (joint1.ToString ()).gameObject;
     if (joint2 != null)
         script.joint2 = body.FindChild (((Kinect.JointType) joint2).ToString ()).gameObject;
     else if (_BoneMap.ContainsKey (joint1))
         script.joint2 = body.FindChild (_BoneMap [joint1].ToString ()).gameObject;
     else
         Debug.LogError ("BAD JOINT: " + joint1);
     return bone;
 }
开发者ID:rgerd,项目名称:TunnelVision,代码行数:15,代码来源:SkeletonRender.cs

示例3: GetHandRay

 public Ray GetHandRay(Kinect.JointType hand)
 {
     if (hand == Kinect.JointType.HandLeft)
         return GetHandRay(Kinect.JointType.ElbowLeft, Kinect.JointType.HandLeft);
     else if (hand == Kinect.JointType.HandRight)
         return GetHandRay(Kinect.JointType.ElbowRight, Kinect.JointType.HandRight);
     else
     {
         Debug.LogError("Error: GetHandRay Method only takes HandLeft and HandRight. Got: " + hand.ToString());
         return GetHandRay(Kinect.JointType.ElbowRight, Kinect.JointType.HandRight);
     }
 }
开发者ID:ctankep,项目名称:ViveEmuTemplate,代码行数:12,代码来源:KinectAvatar.cs


注:本文中的Windows.Kinect.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。