/// <summary> /// Updates list of depth modes that this camera has. /// </summary> private void UpdateDepthModes() { List <DepthFrameMode> modes = new List <DepthFrameMode>(); // Get number of modes int numModes = KinectNative.freenect_get_depth_mode_count(this.parentDevice.devicePointer); // Go through modes for (int i = 0; i < numModes; i++) { DepthFrameMode mode = (DepthFrameMode)FrameMode.FromInterop(KinectNative.freenect_get_depth_mode(i), FrameMode.FrameModeType.DepthFormat); if (mode != null) { modes.Add(mode); } } // All done this.Modes = modes.ToArray(); }