private static void DrawTransform(Transform t) { for (int index = 0; index < t.get_childCount(); ++index) { Gizmos.DrawLine(t.get_position(), t.GetChild(index).get_position()); DrawSkeleton.DrawTransform(t.GetChild(index)); } }
private static void DrawTransform(Transform t) { for (int i = 0; i < t.childCount; i++) { Gizmos.DrawLine(t.position, t.GetChild(i).position); DrawSkeleton.DrawTransform(t.GetChild(i)); } }
private void StartNonTraceableMode() { SetUIInNoTrackableMode(); _sensor = KinectSensor.GetDefault(); //todo - check, not working if (_sensor != null) { _sensor.Open(); // 2) Initialize the background removal tool. _backgroundRemovalTool = new BackgroundRemovalTool(_sensor.CoordinateMapper); _drawSkeleton = new DrawSkeleton(_sensor, (int)(KinectSkeleton.Width), (int)(KinectSkeleton.Height)); _reader = _sensor.OpenMultiSourceFrameReader(FrameSourceTypes.Color | FrameSourceTypes.Depth | FrameSourceTypes.BodyIndex | FrameSourceTypes.Body); _reader.MultiSourceFrameArrived += Reader_MultiSourceFrameArrived_NonTraceable; } }
private void StartTraceableMode() { SetUIInTrackingMode(); //ExerciseVideo.Play(); _sensor = KinectSensor.GetDefault(); //todo - check, not working if (_sensor != null) { _sensor.Open(); // 2) Initialize the background removal tool. _backgroundRemovalTool = new BackgroundRemovalTool(_sensor.CoordinateMapper); _drawSkeleton = new DrawSkeleton(_sensor, (int)(KinectSkeleton.Width), (int)(KinectSkeleton.Height)); _reader = _sensor.OpenMultiSourceFrameReader(FrameSourceTypes.Color | FrameSourceTypes.Depth | FrameSourceTypes.BodyIndex | FrameSourceTypes.Body); _reader.MultiSourceFrameArrived += Reader_MultiSourceFrameArrived; //Gesture detection Exercise tempExercise = CurrentExercise; _gestureAnalysis = new GestureAnalysis(ref tempExercise); _gestureDetector = new GestureDetector(_sensor, _gestureAnalysis, CurrentExercise); _gestureAnalysis.startGestureDeteced += _gestureAnalysis_startGestureDeteced; CurrentExercise.CreateRounds(); //_timer.Start(); } ExerciseVideo.Play(); inPlayMode = true; }
private void OnDrawGizmos() { Gizmos.set_color(Color.get_white()); DrawSkeleton.DrawTransform(((Component)this).get_transform()); }
private void OnDrawGizmos() { Gizmos.color = Color.white; DrawSkeleton.DrawTransform(base.transform); }