Beispiel #1
0
        public DeviceResources(IFactory factory, IDeviceHandle <IHMDDevice, IHMDInfo> handle)
        {
            if (factory == null || handle == null)
            {
                throw new ArgumentNullException();
            }

            Info   = handle.DeviceInfo;
            Device = handle.CreateDevice();
            Sensor = Device.Sensor;
            Fusion = factory.CreateSensorFusion(Sensor);

            if (Info == null)
            {
                throw new ArgumentNullException();
            }
            if (Device == null)
            {
                throw new ArgumentNullException();
            }
            if (Sensor == null)
            {
                throw new ArgumentNullException();
            }

            Key = new DeviceKey(Sensor.Info);
        }
Beispiel #2
0
        public HMD(IHMDInfo info, ReaderWriterLockSlim @lock)
        {
            if (info == null)
                throw new ArgumentNullException();

            if (@lock == null)
                throw new ArgumentNullException();

            _info = info;
            _lock = @lock;
        }
Beispiel #3
0
        public HMD(IHMDInfo info, ReaderWriterLockSlim @lock)
        {
            if (info == null)
            {
                throw new ArgumentNullException();
            }

            if (@lock == null)
            {
                throw new ArgumentNullException();
            }

            _info = info;
            _lock = @lock;
        }
Beispiel #4
0
		public DeviceResources(IFactory factory, IDeviceHandle<IHMDDevice, IHMDInfo> handle)
		{
			if (factory == null || handle == null)
				throw new ArgumentNullException();

			Info = handle.DeviceInfo;
			Device = handle.CreateDevice();
			Sensor = Device.Sensor;
			Fusion = factory.CreateSensorFusion(Sensor);

			if (Info == null)
				throw new ArgumentNullException();
			if (Device == null)
				throw new ArgumentNullException();
			if (Sensor == null)
				throw new ArgumentNullException();

			Key = new DeviceKey(Sensor.Info);
		}
Beispiel #5
0
        public DeviceResources(IFactory factory, IHMDDevice handle)
        {
            if (factory == null || handle == null)
                throw new ArgumentNullException();

            Info = handle.Info;
            Device = handle;
            Sensor = Device.GetSensorState(0.0);

            if (Info == null)
                throw new ArgumentNullException();
            if (Device == null)
                throw new ArgumentNullException();
            if (Sensor == null)
                System.Diagnostics.Trace.TraceWarning("Unable to create Sensor");

            if (Sensor != null)
                Key = new DeviceKey(Device.SensorInfo);
        }
Beispiel #6
0
        public DeviceResources(IFactory factory, IDeviceHandle<IHMDDevice, IHMDInfo> handle)
        {
            if (factory == null || handle == null)
                throw new ArgumentNullException();

            Info = handle.DeviceInfo;
            Device = handle.CreateDevice();
            Sensor = Device.Sensor;
            Fusion = factory.CreateSensorFusion(Sensor);

            if (Info == null)
                throw new ArgumentNullException();
            if (Device == null)
                throw new ArgumentNullException();
            if (Sensor == null)
                System.Diagnostics.Trace.TraceWarning("Unable to create Sensor");

            if (Sensor != null)
                Key = new DeviceKey(Sensor.Info);
        }