Beispiel #1
0
        public static DeviceInfo[] EnumerateDevices()
        {
            WrapperArray csa = OpenNI_enumerateDevices();

            IntPtr[] array = new IntPtr[csa.Size];
            Marshal.Copy(csa.Data, array, 0, csa.Size);
            DeviceInfo[] arrayObjects = new DeviceInfo[csa.Size];
            for (int i = 0; i < csa.Size; i++)
            {
                arrayObjects[i] = new DeviceInfo(array[i]);
            }
            OpenNI_destroyDevicesArray(csa);
            return(arrayObjects);
        }
Beispiel #2
0
        public VideoMode[] getSupportedVideoModes()
        {
            WrapperArray csa = SensorInfo_getSupportedVideoModes(this.Handle);

            IntPtr[] array = new IntPtr[csa.Size];
            Marshal.Copy(csa.Data, array, 0, csa.Size);
            VideoMode[] arrayObjects = new VideoMode[csa.Size];
            for (int i = 0; i < csa.Size; i++)
            {
                arrayObjects[i] = new VideoMode(array[i], true);
            }
            SensorInfo_destroyVideoModesArray(csa);
            return(arrayObjects);
        }
Beispiel #3
0
 private static extern IntPtr SensorInfo_destroyVideoModesArray(WrapperArray array);
Beispiel #4
0
 private static extern IntPtr OpenNI_destroyDevicesArray(WrapperArray array);
Beispiel #5
0
 private static extern IntPtr OpenNI_destroyDevicesArray(WrapperArray array);
 private static extern IntPtr SensorInfo_destroyVideoModesArray(WrapperArray array);