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


C# HandState.ToString方法代码示例

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


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

示例1: Person

 public Person(string ID, Point3D location, string gesture, trackingStates trackState,Joint leftHand, Joint rightHand, HandState leftHandState, HandState rightHandState, TrackingConfidence leftHandConfidence, TrackingConfidence rightHandConfidence)
 {
     this.ID = ID;
     this.location = location;
     this.gesture = gesture;
     this.trackingState = (int)trackState;
     this.leftHandLocation = null;
     this.rightHandLocation = null;
     if (leftHand.TrackingState == TrackingState.Tracked) {
         this.leftHandLocation = new Point3D((double)leftHand.Position.X, (double)leftHand.Position.Y, (double)leftHand.Position.Z);
         this.leftHandState = leftHandState.ToString();
         this.leftHandConfidence = leftHandConfidence.ToString();
         this.rightHandConfidence = rightHandConfidence.ToString();
     }
     if (rightHand.TrackingState == TrackingState.Tracked)
     {
         this.rightHandLocation = new Point3D((double)rightHand.Position.X, (double)rightHand.Position.Y, (double)rightHand.Position.Z);
         this.rightHandState = rightHandState.ToString();
     }
     
 }
开发者ID:ase-lab,项目名称:SoD_Sensor_v2,代码行数:21,代码来源:Person.cs

示例2: BuildHandMessage

 public OscMessage BuildHandMessage(Body body, string key, HandState state, TrackingConfidence confidence)
 {
     var address = String.Format("/bodies/{0}/hands/{1}", body.TrackingId, key);
     //System.Diagnostics.Debug.WriteLine(address);
     return new OscMessage(address, state.ToString(), confidence.ToString());
 }
开发者ID:greenbaum,项目名称:KinectV2-OSC,代码行数:6,代码来源:MessageBuilder.cs

示例3: DrawHand

        /// <summary>
        /// Draws a hand symbol if the hand is tracked: red circle = closed, green circle = opened; blue circle = lasso
        /// </summary>
        /// <param name="handState">state of the hand</param>
        /// <param name="handPosition">position of the hand</param>
        /// <param name="drawingContext">drawing context to draw to</param>
        private void DrawHand(HandState handState, Point handPosition, DrawingContext drawingContext)
        {
            switch (handState)
            {
                case HandState.Closed:

                    drawingContext.DrawEllipse(this.handClosedBrush, null, handPosition, HandSize, HandSize);
                    break;

                case HandState.Open:
                    drawingContext.DrawEllipse(this.handOpenBrush, null, handPosition, HandSize, HandSize);
                    break;

                case HandState.Lasso:
                    drawingContext.DrawEllipse(this.handLassoBrush, null, handPosition, HandSize, HandSize);
                    break;
            }
            this.drawtext(drawingContext, handState.ToString(), handPosition);
        }
开发者ID:jkevinp,项目名称:ergoMC,代码行数:25,代码来源:Rula.xaml.cs


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