Esempio n. 1
0
        public static Remote CreateRemote(BaseRemote sender, string name)
        {
            Remote remote = null;
            switch (sender.Type)
            {
                case UniVRPNity.Type.Analog:
                    AnalogRemote analog = new AnalogRemote(name);
                    analog.AnalogChanged += new AnalogRemote.AnalogChangeEventHandler(sender.AnalogChanged);
                    remote = analog;
                    break;

                case UniVRPNity.Type.Button:
                    ButtonRemote button = new ButtonRemote(name);
                    button.ButtonChanged += new ButtonRemote.ButtonChangeEventHandler(sender.ButtonChanged);
                    remote = button;
                    break;

                case UniVRPNity.Type.Tracker:
                    TrackerRemote tracker = new TrackerRemote(name);
                    tracker.TrackerChanged += new TrackerRemote.TrackerChangeEventHandler(sender.TrackerChanged);
                    remote = tracker;
                    break;
            }
            return remote;
        }
Esempio n. 2
0
 protected override void create()
 {
     remote = TrackerRemote = new TrackerRemote(Name + "@" + VRPNAddressServer,
         TrackerRemote.DefaultSensorsNumber,
         UniVRPNityAddressServer,
         UniVRPNityPortServer);
     TrackerRemote.TrackerChanged += new TrackerRemote.TrackerChangeEventHandler(TrackerChangedMiddle);
 }
Esempio n. 3
0
    public void Start()
    {
        Debug.Log(deviceName + " Client");

        analog = new AnalogRemote(deviceName + '@' + deviceIP);
        analog.AnalogChanged += new AnalogRemote.AnalogChangeEventHandler(this.AnalogChanged);
        button = new ButtonRemote(deviceName + '@' + deviceIP, buttonValues.Capacity);
        button.ButtonChanged += new ButtonRemote.ButtonChangeEventHandler(this.ButtonChanged);
        tracker = new TrackerRemote(deviceName + '@' + deviceIP);
        tracker.TrackerChanged += new TrackerRemote.TrackerChangeEventHandler(this.TrackerChanged);
    }
Esempio n. 4
0
 public void Start()
 {
     tracker = new TrackerRemote(deviceName + '@' + deviceIP);
     tracker.TrackerChanged += new TrackerRemote.TrackerChangeEventHandler(this.TrackerChanged);
 }
Esempio n. 5
0
 protected override void destroy()
 {
     TrackerRemote.TrackerChanged -= new TrackerRemote.TrackerChangeEventHandler(TrackerChangedMiddle);
     remote = TrackerRemote = null;
 }