/// <summary> /// This constructor takes the static gesture map from the XML and spins up a state map for the user /// </summary> /// <param name="map"></param> public GestureMapState(GestureMap map) { Messages = new List <string>(); MessagesWaiting = false; _gesturestate = new List <GestureState>(); InitializeGestureState(map); }
public void InitializeGestureState(GestureMap map) { foreach (var gesturemapping in map.Items) { var state = new GestureState(gesturemapping); _gesturestate.Add(state); } }
public void InitializeGestureState(GestureMap map) { foreach (var gesturemapping in map.Items) { var state = new GestureState(gesturemapping); _gesturestate.Add(state); } }
public static void Init() { // First Load the XML File that contains the application configuration _gestureMap = new GestureMap(); _gestureMap.LoadGesturesFromXml(GestureFileName); _chooser = new KinectSensorChooser(); _chooser.KinectChanged += ChooserSensorChanged; _chooser.Start(); // Instantiate the in memory representation of the gesture state for each player _gestureMaps = new Dictionary<int, GestureMapState>(); }
public override GestureMap GetGestureMap() { GestureMap map = new GestureMap(); Gesture moving = new Gesture("moving", 1000, (int)ViCharGesture.Moving); moving.Components.Add(new GestureComponent(JointType.HandRight, JointType.ElbowRight, JointRelationship.AboveAndLeft, JointRelationship.AboveAndRight)); map.Items.Add(moving); Gesture jumping = new Gesture("jumping", 1000, (int)ViCharGesture.Jumping); jumping.Components.Add(new GestureComponent(JointType.HandRight, JointType.ShoulderRight, JointRelationship.Below, JointRelationship.Above)); jumping.Components.Add(new GestureComponent(JointType.HandLeft, JointType.ShoulderLeft, JointRelationship.Below, JointRelationship.Above)); map.Items.Add(jumping); return map; }
public override GestureMap GetGestureMap() { GestureMap map = new GestureMap(); Gesture jumping = new Gesture("jumping", 1000, (int)ViCharGesture.Jumping); jumping.Components.Add(new GestureComponent(JointType.HandRight, JointType.ShoulderRight, JointRelationship.Below, JointRelationship.Above)); jumping.Components.Add(new GestureComponent(JointType.HandLeft, JointType.ShoulderLeft, JointRelationship.Below, JointRelationship.Above)); map.Items.Add(jumping); Gesture turningLeft = new Gesture("turningLeft", 1000, (int)ViCharGesture.TurningLeft); turningLeft.Components.Add(new GestureComponent(JointType.KneeRight, JointType.KneeLeft, JointRelationship.AboveAndLeft)); map.Items.Add(turningLeft); Gesture turningRight = new Gesture("turningRight", 1000, (int)ViCharGesture.TurningRight); turningRight.Components.Add(new GestureComponent(JointType.KneeLeft, JointType.KneeRight, JointRelationship.AboveAndRight)); map.Items.Add(turningRight); return map; }
public GestureMapState(GestureMap map) { _gesturestate = new List<GestureState>(); InitializeGestureState(map); }
/// <summary> /// This constructor takes the static gesture map from the XML and spins up a state map for the user /// </summary> /// <param name="map"></param> public GestureMapState(GestureMap map) { Messages = new List<string>(); MessagesWaiting = false; _gesturestate = new List<GestureState>(); InitializeGestureState(map); }