/*///////////////////////////////////////// * CONSTRUCTOR(S)/DESTRUCTOR(S) */ /////////////////////////////////////// public KinectManager(ColorImageFormat p_colour_format, DepthImageFormat p_depth_format, KinectGame_WindowsXNA p_game) { // Initialise the Kinect selector... this.colour_image_format = p_colour_format; this.depth_image_format = p_depth_format; this.root_game = p_game; this.colour_stream = null; this.depth_stream = null; this.skeleton_stream = null; this.debug_video_stream_dimensions = new Vector2(200, 150); status_map = new Dictionary<KinectStatus, string>(); KinectSensor.KinectSensors.StatusChanged += this.KinectSensorsStatusChanged; // handler function for changes in the Kinect system this.DiscoverSensor(); this.status_map.Add(KinectStatus.Undefined, "UNKNOWN STATUS MESSAGE"); this.status_map.Add(KinectStatus.Connected, "Connected.");//string.Empty); this.status_map.Add(KinectStatus.DeviceNotGenuine, "Detected device is not genuine!"); this.status_map.Add(KinectStatus.DeviceNotSupported, "Detected device is not supported!"); this.status_map.Add(KinectStatus.Disconnected, "Disconnected/Device required!"); this.status_map.Add(KinectStatus.Error, "Error in Kinect sensor!"); this.status_map.Add(KinectStatus.Initializing, "Initialising Kinect sensor..."); this.status_map.Add(KinectStatus.InsufficientBandwidth, "Insufficient bandwidth for Kinect sensor!"); this.status_map.Add(KinectStatus.NotPowered, "Detected device is not powered!"); this.status_map.Add(KinectStatus.NotReady, "Detected device is not ready!"); // Load the status message font: this.msg_font = this.root_game.Content.Load<SpriteFont>("Fonts/Segoe16"); this.msg_label_pos = new Vector2(4.0f, 2.0f); }
/*///////////////////////////////////////// * CONSTRUCTOR(S)/DESTRUCTOR(S) *//////////////////////////////////////// public KinectManager(ColorImageFormat p_colour_format, DepthImageFormat p_depth_format, KinectGame_WindowsXNA p_game) { // Initialise the Kinect selector... this.colour_image_format = p_colour_format; this.depth_image_format = p_depth_format; this.root_game = p_game; this.colour_stream = null; this.depth_stream = null; this.skeleton_stream = null; this.debug_video_stream_dimensions = new Vector2(200, 150); status_map = new Dictionary <KinectStatus, string>(); KinectSensor.KinectSensors.StatusChanged += this.KinectSensorsStatusChanged; // handler function for changes in the Kinect system this.DiscoverSensor(); this.status_map.Add(KinectStatus.Undefined, "UNKNOWN STATUS MESSAGE"); this.status_map.Add(KinectStatus.Connected, "Connected.");//string.Empty); this.status_map.Add(KinectStatus.DeviceNotGenuine, "Detected device is not genuine!"); this.status_map.Add(KinectStatus.DeviceNotSupported, "Detected device is not supported!"); this.status_map.Add(KinectStatus.Disconnected, "Disconnected/Device required!"); this.status_map.Add(KinectStatus.Error, "Error in Kinect sensor!"); this.status_map.Add(KinectStatus.Initializing, "Initialising Kinect sensor..."); this.status_map.Add(KinectStatus.InsufficientBandwidth, "Insufficient bandwidth for Kinect sensor!"); this.status_map.Add(KinectStatus.NotPowered, "Detected device is not powered!"); this.status_map.Add(KinectStatus.NotReady, "Detected device is not ready!"); // Load the status message font: this.msg_font = this.root_game.Content.Load <SpriteFont>("Fonts/Segoe16"); this.msg_label_pos = new Vector2(4.0f, 2.0f); }