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


C# JointType.ToString方法代码示例

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


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

示例1: indivJoint

 public indivJoint(Skeleton skel, JointType a, String id)
 {
     name = id;
     skeleton = skel;
     type = a;
     status = false;
     isDefined = true;
     posReg = new position_Register();
     j0 = skeleton.Joints[type];
     loc = new Point3(type.ToString(), j0.Position.X, j0.Position.Y, j0.Position.Z);
 }
开发者ID:tklebanoff,项目名称:kinect2osc,代码行数:11,代码来源:indivJoint.cs

示例2: addBone

 private GameObject addBone(string name, float radius, GameObject prefab, JointType joint1, JointType joint2)
 {
     GameObject bone = PhotonNetwork.Instantiate ("Bone", Vector3.zero, Quaternion.identity, 0);
         //(GameObject) Instantiate(prefab, Vector3.zero, Quaternion.identity);
     bone.name = name; bone.transform.parent = transform;
     BoneScript script = bone.GetComponent("BoneScript") as BoneScript;
     script.radius = radius;
     script.joint1 = transform.FindChild (joint1.ToString()).gameObject;
     script.joint2 = transform.FindChild (joint2.ToString()).gameObject;
     return bone;
 }
开发者ID:rgerd,项目名称:TunnelVision,代码行数:11,代码来源:BodyScript.cs

示例3: JointNode

 public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint)
 {
     this.IsKinectJoint = isKinectJoint;
     this.JointIndex = index;
     Name = isKinectJoint ? index.ToString() : name;
     this.BaseAxis = axis;
     this.Type = type;
     if(Type != NodeTypeEnum.END)
         Children = new ArrayList();
     if (null != parent)
     {
         this.Parent = parent;
         parent.AddChild(this);
     }
 }
开发者ID:Randophilus,项目名称:KinectToBVH,代码行数:15,代码来源:JointNode.cs

示例4: jPair

        public jPair(Skeleton skel, JointType a, JointType b, String id)
        {
            name = id;
            skeleton = skel;
            jointType0 = a;
            jointType1 = b;

            pairStatus = false;
            distReg = new distance_register();

            joint0 = skeleton.Joints[jointType0];
            joint1 = skeleton.Joints[jointType1];
            isDefined = 1;
            firstPoint = new Point3(jointType0.ToString(), joint0.Position.X, joint0.Position.Y, joint0.Position.Z);
            secondPoint = new Point3(jointType1.ToString(), joint1.Position.X, joint1.Position.Y, joint1.Position.Z);
            pair = new Point3Pair(firstPoint, secondPoint);
            pair.distance();
            pair.findtheta();
        }
开发者ID:tklebanoff,项目名称:kinect2osc,代码行数:19,代码来源:jPair.cs

示例5: JointSelector_JointSelected

 private void JointSelector_JointSelected(object sender, JointType e)
 {
     tblJoint.Text = e.ToString();
 }
开发者ID:L-SEG,项目名称:Vitruvius,代码行数:4,代码来源:JointSelectionPage.xaml.cs

示例6: AddSensorValue

 private void AddSensorValue( JointType jointType, string x, int value )
 {
     var key = string.Format( "{0}_{1}", jointType.ToString(), x );
     scratch.AddSensorValue( key, value.ToString() );
 }
开发者ID:kaorun55,项目名称:Kinect22Scratch,代码行数:5,代码来源:MainWindow.xaml.cs

示例7: FindBone

        private static BoneOrientation FindBone(JointType start, JointType end, BoneOrientationCollection collection)
        {
            foreach (BoneOrientation bone in collection)
            {
                if (bone.StartJoint == start && bone.EndJoint == end)
                    return bone;
            }

            throw new Exception("Кость " + start.ToString() + "-" + end.ToString() + " не найдена в коллекции");
        }
开发者ID:scherbinin,项目名称:Kinect,代码行数:10,代码来源:BoneMapperBvhToKinect.cs

示例8: buildObservationSequence

        private List<double[][]> buildObservationSequence(string folder, JointType j)
        {
            List<double[][]> obsSeqs = new List<double[][]>();

            using (StreamReader srx = new StreamReader(folder +"/" + j.ToString() + "_x.csv"))
            {
                using (StreamReader sry = new StreamReader(folder + "/" + j.ToString() + "_y.csv"))
                {
                    using (StreamReader srz = new StreamReader(folder + "/" + j.ToString() + "_z.csv"))
                    {
                        string linex;
                        string[] xrow, yrow, zrow;
                        while ((linex = srx.ReadLine()) != null)
                        {
                            double[][] obsSeq = null;
                            xrow = linex.Split(',');
                            yrow = sry.ReadLine().Split(',');
                            zrow = srz.ReadLine().Split(',');
                            obsSeq = new double[xrow.Length][];
                            for (int i = 0; i < xrow.Length; i++)
                            {
                                obsSeq[i] = new double[] {Convert.ToDouble(xrow[i]),
                                Convert.ToDouble(yrow[i]), Convert.ToDouble(zrow[i])};
                            }
                            obsSeqs.Add(obsSeq);
                        }

                    }
                }
            }
            return obsSeqs;
        }
开发者ID:Daniel-Nichol,项目名称:sign-align,代码行数:32,代码来源:SignClassifier.cs

示例9: GetOscJointMessage

 private OscElement GetOscJointMessage(Skeleton skeleton, JointType joint)
 {
     return new OscElement("/joint/"+joint.ToString(), skeleton.TrackingId, skeleton.Joints[joint].Position.X, skeleton.Joints[joint].Position.Y, skeleton.Joints[joint].Position.Z);
 }
开发者ID:Damonproto,项目名称:InteractiveOS,代码行数:4,代码来源:MainWindow.xaml.cs

示例10: GetNodeIdName

 public static string GetNodeIdName(JointType jointType)
 {
     return (jointType.ToString());
 }
开发者ID:loic-lavergne,项目名称:mckineap,代码行数:4,代码来源:KinectConverter.cs

示例11: DrawShortBone

        // DS added the following two methods to make a parent part shorter by drawing the origin of the child part at a new orgiin point
        internal void DrawShortBone(JointCollection joints, JointType startJoint, JointType endJoint, JointType parentJoint, Texture2D boneTexture, float originAlongParent)
        {
            string nameJoint = startJoint.ToString();
            if (joints[startJoint].TrackingState != JointTrackingState.Tracked ||
                    joints[endJoint].TrackingState != JointTrackingState.Tracked)
                return;

            float depth = joints[startJoint].Position.Z;
            Vector2 start = this.mapMethod(joints[startJoint].Position);
            Vector2 shortStart = this.mapMethod(joints[parentJoint].Position);
            Vector2 end = this.mapMethod(joints[endJoint].Position);
            DrawShortBoneLike(depth, start, end, shortStart, boneTexture, originAlongParent, nameJoint);
            //if (startJoint == JointType.Head)
            //    Console.WriteLine("Cartoon Elements drawBone head position after remapping"+ start.X);
        }
开发者ID:Anniepoo,项目名称:DSalleShare,代码行数:16,代码来源:CartoonElements.cs

示例12: positionLimb

 void positionLimb(Skeleton skeleton, JointType jointType1, JointType jointType2)
 {
     SkeletonPoint pt1 = pointConverter.ConvertPoint(skeleton.Joints[jointType1].Position);
     SkeletonPoint pt2 = pointConverter.ConvertPoint(skeleton.Joints[jointType2].Position);
     String limbKey = jointType1.ToString() + "-" + jointType2.ToString();
     if (!LimbToLineDict.ContainsKey(limbKey))
     {
         Line newLine = new Line();
         newLine.Stroke = Brushes.Black;
         byte gray = 55;
         newLine.Stroke = new SolidColorBrush(Color.FromRgb(gray, gray, gray));
         newLine.StrokeThickness = 26;
         newLine.StrokeStartLineCap = PenLineCap.Round;
         newLine.StrokeEndLineCap = PenLineCap.Round;
         Canvas.SetTop(newLine, 0);
         Canvas.SetLeft(newLine, 0);
         uxMainCanvas.Children.Add(newLine);
         LimbToLineDict.Add(limbKey, newLine);
     }
     Line line = LimbToLineDict[limbKey];
     line.X1 = pt1.X;
     line.X2 = pt2.X;
     line.Y1 = pt1.Y;
     line.Y2 = pt2.Y;
 }
开发者ID:kingston,项目名称:kineticmath,代码行数:25,代码来源:KinectSkeletonNew.xaml.cs

示例13: RaiseGestureDetected

        protected void RaiseGestureDetected(String gesture, JointType joint)
        {
            if ((DateTime.Now - lastGesture).TotalMilliseconds > MinimalPeriodBetweenGestures)
            {
                if (OnGestureDetected != null) OnGestureDetected(this,
                    new GestureEventArgs { Gesture = gesture, Joint = joint });

                lastGesture = DateTime.Now;
                Program.Notify(gesture + " gesture on " + joint.ToString());
            }
            entries[(int)joint].Clear();
        }
开发者ID:N0NamedGuy,项目名称:KinectTV,代码行数:12,代码来源:GestureDetector.cs


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