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


C# HandState类代码示例

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


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

示例1: RaiseHandStateChanged

 private void RaiseHandStateChanged(KinectBody body, HandType handType, HandState previousState)
 {
     if (this.HandStateChanged != null)
     {
         this.HandStateChanged(this, new KinectHandStateEventArgs(body, handType, previousState));
     }
 }
开发者ID:semihguresci,项目名称:kgp,代码行数:7,代码来源:HandStateTrackingProcessor.cs

示例2: structRectangle

 public structRectangle() {
     rect = new Rectangle();
     beginTime = new TimeSpan();
     handState = new HandState();
     position = "";
     gestureTried = false;
 }
开发者ID:ylegatParticulate,项目名称:NPI---Kinect-2.0,代码行数:7,代码来源:MainWindow.xaml.cs

示例3: Update

        public void Update(TrackingConfidence leftConfidence, HandState leftHand, TrackingConfidence rightConfidence, HandState rightHand)
        {
            if ( leftConfidence == TrackingConfidence.High && leftHand == HandState.Closed )
            {
                if (!this.HasLeftHandWeapon)
                {
                    this.LeftHandWeaponIndex = this.selectRandomWeapon();
                    this.HasLeftHandWeapon = true;
                }
            }
            else
            {
                this.HasLeftHandWeapon = false;
                this.LeftHandWeaponIndex = -1;
            }

            if (rightConfidence == TrackingConfidence.High && rightHand == HandState.Closed)
            {
                if (!this.HasRightHandWeapon)
                {
                    this.RightHandWeaponIndex = this.selectRandomWeapon();
                    this.HasRightHandWeapon = true;
                }
            }
            else
            {
                this.HasRightHandWeapon = false;
                this.RightHandWeaponIndex = -1;
            }
        }
开发者ID:space150,项目名称:s150-venice-halloween-2015,代码行数:30,代码来源:BodyState.cs

示例4: Awake

				void Awake ()
				{	
						handState = HandState.NoAction;
						
						leapManager = (GameObject.Find ("LeapManager") as GameObject).GetComponent (typeof(LeapManager)) as LeapManager;
						cueStickController = (GameObject.Find ("CueStickTip") as GameObject).GetComponent (typeof(CueStickController)) as CueStickController;

						leapManager.leapController.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
						leapManager.leapController.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f);
						leapManager.leapController.Config.SetFloat ("Gesture.Swipe.MinVelocity", 750f);
						leapManager.leapController.Config.Save ();

						gameStates.Add (GameState.CameraAutoAdjust);
						gameStates.Add (GameState.CameraManualAdjust);
						gameStates.Add (GameState.Aiming);
						gameStates.Add (GameState.AfterShot);
						gameStates.Add (GameState.TurnEnd);

						

						viewAdjustmentStateIcon = (GameObject.Find ("ViewAdjustmentStateIcon") as GameObject).GetComponent (typeof(RawImage)) as RawImage; 
						aimingStateIcon = (GameObject.Find ("AimingStateIcon") as GameObject).GetComponent (typeof(RawImage)) as RawImage; 
						swipeActionIcon = (GameObject.Find ("SwipeActionIcon") as GameObject).GetComponent (typeof(RawImage)) as RawImage;

						playerTurn = (GameObject.Find ("PlayerTurn") as GameObject).GetComponent (typeof(Text)) as Text; 
						cueBall = GameObject.FindGameObjectWithTag ("cueBall");

						cueBall = GameObject.FindGameObjectWithTag ("cueBall");
						camera = GameObject.FindGameObjectWithTag ("PlayerCamera");
						ballsParent = GameObject.FindGameObjectWithTag ("balls");
						foreach (Transform ball in ballsParent.transform) {
								balls.Add (ball.gameObject);				
						}
				}
开发者ID:ly774508966,项目名称:leapMotion8Ball,代码行数:34,代码来源:Game.cs

示例5: CustomBody

        /// <summary>
        /// Initializes a new instance of the <see cref="CustomBody"/> class.
        /// </summary>
        public CustomBody()
        {
            _clippedEdges = FrameEdges.None;

            _handLeftConfidence = TrackingConfidence.Low;
            _handLeftState = HandState.Unknown;
            _handRightConfidence = TrackingConfidence.Low;
            _handRightState = HandState.Unknown;
            _isDisposed = false;
            _isRestricted = false;
            _isTracked = false;

            _joints = new Dictionary<JointType, IJoint>();
            _jointOrientations = new Dictionary<JointType, IJointOrientation>();
            foreach (var jointType in CustomJointType.AllJoints)
            {
                _joints.Add(jointType, new CustomJoint(jointType));
                _jointOrientations.Add(jointType, new CustomJointOrientation(jointType));
            }

            _lean = new PointF();

            _leanTrackingState = TrackingState.NotTracked;
            _trackingId = ulong.MaxValue;
            _hasMappedDepthPositions = false;
            _hasMappedColorPositions = false;
        }
开发者ID:douglaswinstonr,项目名称:KinectDL,代码行数:30,代码来源:CustomBody.cs

示例6: HandSliderControl

 public HandSliderControl(HandDetectionType handDetectionType, HandState requirredHandState,
     Directions direction, CoordinateMapper mapper)
     : base(handDetectionType, requirredHandState)
 {
     SmoothLevel = 0;
     Direction = direction;
     _mapper = mapper;
 }
开发者ID:Aniel,项目名称:SimpleKinectGesture,代码行数:8,代码来源:HandSliderControl.cs

示例7: RangeTrigger

 public RangeTrigger(string name, HandState<int> state)
     : base(name)
 {
     Hand = state.Hand;
     state.ValueChanged += OnStateValueChanged;
     ResistanceTime = 1000000;
     StickinessTime = 1000000;
 }
开发者ID:RossDay,项目名称:Leap,代码行数:8,代码来源:RangeTrigger.cs

示例8: HandOverHeadDetector

 public HandOverHeadDetector(HandDetectionType handDetectionType, HandState state, int framesToRegister = 10,
     double headOffset = 0, bool headOffsetAutomatic = true)
     : base(handDetectionType, state)
 {
     FramesToRegister = framesToRegister;
     HeadOffset = headOffset;
     HeadOffsetAutomatic = headOffsetAutomatic;
 }
开发者ID:Aniel,项目名称:SimpleKinectGesture,代码行数:8,代码来源:HandOverHeadDetector.cs

示例9: KinectHandStateEventArgs

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="body">Kinect body</param>
        /// <param name="handType">Hand type</param>
        /// <param name="previousHandState">Previous hand state</param>
        public KinectHandStateEventArgs(KinectBody body, HandType handType, HandState previousHandState)
        {
            if (body == null)
                throw new ArgumentNullException("body");

            this.body = body;
            this.handType = handType;
            this.previousHandState = previousHandState;
        }
开发者ID:semihguresci,项目名称:kgp,代码行数:15,代码来源:KinectHandStateEventArgs.cs

示例10: TrackerArgs

 public TrackerArgs(Body body, HandState left, HandState right, int yaw, int pitch, int roll)
 {
     this.body = body;
     LeftState = left;
     RightState = right;
     Yaw = yaw;
     Pitch = pitch;
     Roll = roll;
 }
开发者ID:ThisIsLeoZhao,项目名称:Graduation-Project,代码行数:9,代码来源:TrackerArgs.cs

示例11: getTrackerInfo

 public void getTrackerInfo(out Body body, out HandState left, out HandState right, out int yaw, out int pitch,
     out int roll)
 {
     body = eTracker.Engager;
     left = eTracker.LeftState;
     right = eTracker.RightState;
     yaw = eTracker.Yaw;
     pitch = eTracker.Pitch;
     roll = eTracker.Roll;
 }
开发者ID:ThisIsLeoZhao,项目名称:Graduation-Project,代码行数:10,代码来源:EngagementManager.cs

示例12: Person

 public Person(int id)
 {
     this.id = id;
     this.instance = Send.getInstance ();
     if (instance == null) {
         Console.WriteLine ("Die Instanz ist null");
     }
     leftHandState = HandState.NotTracked;
     rightHandState = HandState.NotTracked;
     message = new string[2];
 }
开发者ID:uagnd,项目名称:S-BPM_VR,代码行数:11,代码来源:Person.cs

示例13: Add

 public void Add(HandState aNext)
 {
     if (State == aNext)
     {
         Count++;
     }
     else
     {
         State = aNext;
         Count = 1;
     }
 }
开发者ID:Dig-Doug,项目名称:BU_KinectShowcase,代码行数:12,代码来源:HandStateCounter.cs

示例14: Cursor

 public Cursor()
 {
     //
     deltaPosition = Vector2.zero;
     //
     deltaTime = 0;
     personId = 0;
     leftHand = false;
     rightHand = false;
     cursorId = -1;
     handState = HandState.Open;
     position = Vector2.zero;
 }
开发者ID:ShipuW,项目名称:unity-study,代码行数:13,代码来源:Cursor.cs

示例15: HandleObject

 //constructors
 public HandleObject()
 {
     pos = new Point(200, 200);
     vel = new Point(0, 0);
     this.radius = 20;
     inactiveBrush = Brushes.Red;
     activeBrush = Brushes.Green;
     pen = new Pen();
     prevHandState = HandState.Unknown;
     isLeftHandOnObject = false;
     isRightHandOnObject = false;
     isBoundToHand = false;
     currentBrush = inactiveBrush;
     maxRadiusFactor = 1.5;
     minRadiusFactor = 0.75;
 }
开发者ID:davidboyd96,项目名称:Bits-Please--FINAL,代码行数:17,代码来源:HandleObject.cs


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