Ejemplo n.º 1
0
        /// <summary>Get the instance ID of a sensor.</summary>
/// <returns>The sensor instance ID, or -1 if the sensor is NULL.</returns>
/// <remarks>This can be called before any sensors are opened.</remarks>
        public static int SensorGetInstanceID(global::SharpSDL.SDL_Sensor sensor)
        {
            var __arg0 = ReferenceEquals(sensor, null) ? global::System.IntPtr.Zero : sensor.__Instance;
            var __ret  = __Internal.SensorGetInstanceID(__arg0);

            return(__ret);
        }
Ejemplo n.º 2
0
        /// <summary>Get the implementation dependent name of a sensor.</summary>
/// <returns>The sensor name, or NULL if the sensor is NULL.</returns>
        public static string SensorGetName(global::SharpSDL.SDL_Sensor sensor)
        {
            var __arg0 = ReferenceEquals(sensor, null) ? global::System.IntPtr.Zero : sensor.__Instance;
            var __ret  = __Internal.SensorGetName(__arg0);

            return(Marshal.PtrToStringAnsi(__ret));
        }
Ejemplo n.º 3
0
        /// <summary>Get the current state of an opened sensor.</summary>
/// <param name="sensor">The sensor to query</param>
/// <param name="data">A pointer filled with the current sensor state</param>
/// <param name="num_values">The number of values to write to data</param>
/// <returns>0 or -1 if an error occurred.</returns>
/// <remarks>The number of values and interpretation of the data is sensor dependent.</remarks>
        public static int SensorGetData(global::SharpSDL.SDL_Sensor sensor, ref float data, int num_values)
        {
            var __arg0 = ReferenceEquals(sensor, null) ? global::System.IntPtr.Zero : sensor.__Instance;

            fixed(float *__data1 = &data)
            {
                var __arg1 = __data1;
                var __ret  = __Internal.SensorGetData(__arg0, __arg1, num_values);

                return(__ret);
            }
        }
Ejemplo n.º 4
0
        /// <summary>Close a sensor previously opened with SDL_SensorOpen()</summary>
        public static void SensorClose(global::SharpSDL.SDL_Sensor sensor)
        {
            var __arg0 = ReferenceEquals(sensor, null) ? global::System.IntPtr.Zero : sensor.__Instance;

            __Internal.SensorClose(__arg0);
        }