public AddPoint ( double _x, double _z ) : void | ||
_x | double | |
_z | double | |
Результат | void |
/// <summary> /// Recupere les positions X et Z du skeleton, et cree un nouveau points dans la zone /// </summary> /// <param name="_zone"></param> private void ConvertAndStoreSkelPosition(Zone _zone) { try { if (SkelData.Length > 0) { var skel = SkelData.Where(u => u.TrackingState == SkeletonTrackingState.Tracked).FirstOrDefault(); if(skel != null) { _zone.AddPoint(Math.Round(skel.Position.X,2), Math.Round(skel.Position.Z,2)); } else { throw new SkeletonNotFoundException("Skeleton not found"); } } } catch (SkeletonNotFoundException) { Console.WriteLine("Skeleton non trouvé, nouvelle tentative..."); Thread.Sleep(500); ConvertAndStoreSkelPosition(_zone); } }