Esempio n. 1
0
 public Sensor this[int index]
 {
     get
     {
         object error;
         var    ptr = NativeMethods.rs2_create_sensor(m_instance, index, out error);
         return(new Sensor(ptr));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Creates sensor by index
 /// </summary>
 /// <param name="index">the zero based index of sensor to retrieve</param>
 /// <returns>the requested sensor</returns>
 public Sensor this[int index]
 {
     get
     {
         object error;
         var    ptr = NativeMethods.rs2_create_sensor(Handle, index, out error);
         return(Sensor.Create <T>(ptr));
     }
 }
Esempio n. 3
0
        public IEnumerator <Sensor> GetEnumerator()
        {
            object error;

            int sensorCount = NativeMethods.rs2_get_sensors_count(m_instance, out error);

            for (int i = 0; i < sensorCount; i++)
            {
                var ptr = NativeMethods.rs2_create_sensor(m_instance, i, out error);
                yield return(new Sensor(ptr));
            }
        }
Esempio n. 4
0
        /// <inheritdoc/>
        public IEnumerator <T> GetEnumerator()
        {
            object error;

            int sensorCount = NativeMethods.rs2_get_sensors_count(Handle, out error);

            for (int i = 0; i < sensorCount; i++)
            {
                var ptr = NativeMethods.rs2_create_sensor(Handle, i, out error);
                yield return(Sensor.Create <T>(ptr));
            }
        }