Beispiel #1
0
        public CommunicationManager(IntAirAct.IAIntAirAct intAirAct, PairingRecognizer pairingRecognizer, MSELocator.LocatorInterface locator, PersonManager personManager)
        {
            this.intAirAct = intAirAct;
            this.pairingRecognizer = pairingRecognizer;
            this.locator = locator;
            this.personManager = personManager;

            // Pairing
            intAirAct.Route(Routes.RequestPairingRoute, new Action<IARequest, IAResponse>(UpdateDevicePairingState));

            // Properties of Devices
            intAirAct.Route(Routes.GetOffsetAngleRoute, new Action<IARequest, IAResponse>(GetOffsetAngle));
            intAirAct.Route(Routes.SetOrientationRoute, new Action<IARequest, IAResponse>(UpdateDeviceOrientation));
            intAirAct.Route(Routes.SetLocationRoute, new Action<IARequest, IAResponse>(UpdateDeviceLocation));

            // Locating Devices
            intAirAct.Route(Routes.GetDeviceInfoRoute, new Action<IARequest, IAResponse>(GetDevice));
            intAirAct.Route(Routes.GetAllDeviceInfoRoute, new Action<IARequest, IAResponse>(GetDevices));
            intAirAct.Route(Routes.GetNearestDeviceInViewRoute, new Action<IARequest, IAResponse>(GetNearestDeviceInView));
            intAirAct.Route(Routes.GetAllDevicesInViewRoute, new Action<IARequest, IAResponse>(GetDevicesInView));
            intAirAct.Route(Routes.GetNearestDeviceInRangeRoute, new Action<IARequest, IAResponse>(GetNearestDeviceInRange));
            intAirAct.Route(Routes.GetAllDevicesInRangeRoute, new Action<IARequest, IAResponse>(GetDevicesInRange));

            /* Depricated!!!
            intAirAct.Route(Routes.GetAllDevicesWithIntersectionPointsRoute, new Action<IARequest, IAResponse>(GetDevicesWithIntersectionPoint));
             */
        }
Beispiel #2
0
        public MSEKinectManager(bool RequireKinect = false)
        {
            if (RequireKinect)
                TestKinectAvailability();

            //Instantiate Components
            intAirAct = IAIntAirAct.New();
            locator = new Locator();
            pairingRecognizer = new PairingRecognizer(locator, intAirAct);
            gestureController = new GestureController();
            personManager = new PersonManager(locator, gestureController, intAirAct);
            deviceManager = new DeviceManager(locator, intAirAct);
        }
        public MSEKinectManager(bool RequireKinect = false)
        {
            if (RequireKinect)
            {
                TestKinectAvailability();
            }


            //Instantiate Components
            intAirAct         = IAIntAirAct.New();
            locator           = new Locator();
            pairingRecognizer = new PairingRecognizer(locator, intAirAct);
            gestureController = new GestureController();
            personManager     = new PersonManager(locator, gestureController, intAirAct);
            deviceManager     = new DeviceManager(locator, intAirAct);
        }
Beispiel #4
0
        public CommunicationManager(IntAirAct.IAIntAirAct intAirAct, PairingRecognizer pairingRecognizer, MSELocator.LocatorInterface locator, PersonManager personManager)
        {
            this.intAirAct         = intAirAct;
            this.pairingRecognizer = pairingRecognizer;
            this.locator           = locator;
            this.personManager     = personManager;

            // Pairing
            intAirAct.Route(Routes.RequestPairingRoute, new Action <IARequest, IAResponse>(UpdateDevicePairingState));

            // Properties of Devices
            intAirAct.Route(Routes.GetOffsetAngleRoute, new Action <IARequest, IAResponse>(GetOffsetAngle));
            intAirAct.Route(Routes.SetOrientationRoute, new Action <IARequest, IAResponse>(UpdateDeviceOrientation));
            intAirAct.Route(Routes.SetLocationRoute, new Action <IARequest, IAResponse>(UpdateDeviceLocation));

            // Locating Devices
            intAirAct.Route(Routes.GetDeviceInfoRoute, new Action <IARequest, IAResponse>(GetDevice));
            intAirAct.Route(Routes.GetAllDeviceInfoRoute, new Action <IARequest, IAResponse>(GetDevices));
            intAirAct.Route(Routes.GetNearestDeviceInViewRoute, new Action <IARequest, IAResponse>(GetNearestDeviceInView));
            intAirAct.Route(Routes.GetAllDevicesInViewRoute, new Action <IARequest, IAResponse>(GetDevicesInView));
            intAirAct.Route(Routes.GetNearestDeviceInRangeRoute, new Action <IARequest, IAResponse>(GetNearestDeviceInRange));
            intAirAct.Route(Routes.GetAllDevicesInRangeRoute, new Action <IARequest, IAResponse>(GetDevicesInRange));

            /* Depricated!!!
             * intAirAct.Route(Routes.GetAllDevicesWithIntersectionPointsRoute, new Action<IARequest, IAResponse>(GetDevicesWithIntersectionPoint));
             */
        }
Beispiel #5
0
 void trackerChanged(PersonManager sender, Tracker tracker)
 {
     if (tracker != null)
     {
         //drawnTracker = new DrawnTracker(tracker);
     }
 }
Beispiel #6
0
 void personRemoved(PersonManager personManager, PairablePerson pairablePerson)
 {
     this.Dispatcher.Invoke(new Action(delegate()
     {
         if (PersonControlDictionary.ContainsKey(pairablePerson))
         {
             canvas.Children.Remove(PersonControlDictionary[pairablePerson]);
             PersonControlDictionary.Remove(pairablePerson);
         }
     }));
 }
Beispiel #7
0
 void personAdded(PersonManager personManager, PairablePerson pairablePerson)
 {
     this.Dispatcher.Invoke(new Action(delegate()
     {
         if (!PersonControlDictionary.ContainsKey(pairablePerson))
         {
             PersonControlDictionary[pairablePerson] = new PersonControl(pairablePerson);
             canvas.Children.Add(PersonControlDictionary[pairablePerson]);
         }
     }));
 }