Ejemplo n.º 1
0
 /// <summary>
 /// Gets the size of the specified format
 /// </summary>
 /// <param name="format">
 /// Format to get the size for
 /// </param>
 public int this[DataFormatOption format]
 {
     get
     {
         return(this.sizes[format]);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the dimensions of the specified format
 /// </summary>
 /// <param name="format">
 /// Format to get the size for
 /// </param>
 public Point this[DataFormatOption format]
 {
     get
     {
         return(this.dimensions[format]);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Sets the DepthCameras's data format. Support function for DepthCamera.DataFormat
        /// </summary>
        /// <param name="format">
        /// A <see cref="DepthCamera.DataFormatOptions"/>
        /// </param>
        private void SetDataFormat(DepthCamera.DataFormatOption format)
        {
            // change depth map that's waiting cause format has changed
            this.UpdateNextFrameDepthMap();

            int result = KinectNative.freenect_set_depth_format(this.parentDevice.devicePointer, format);

            if (result != 0)
            {
                throw new Exception("Could not switch to depth format " + format + ". Error Code: " + result);
            }
            this.dataFormat = format;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Sets the VideoCamera's data format. Support function for VideoCamera.DataFormat property.
        /// </summary>
        /// <param name="format">
        /// Format to change the video camera to
        /// </param>
        protected void SetDataFormat(VideoCamera.DataFormatOption format)
        {
            // change imagemap that's waiting cause format has changed
            this.UpdateNextFrameImageMap();

            // change format
            int result = KinectNative.freenect_set_video_format(this.parentDevice.devicePointer, format);

            if (result != 0)
            {
                throw new Exception("Could not switch to video format " + format + ". Error Code: " + result);
            }
            this.dataFormat = format;
        }
Ejemplo n.º 5
0
			/// <summary>
			/// Gets the size of the specified format
			/// </summary>
			/// <param name="format">
			/// Format to get the size for
			/// </param>
			public int this[DataFormatOption format]
			{
				get
				{
					return this.sizes[format];
				}
			}
Ejemplo n.º 6
0
			/// <summary>
			/// Gets the dimensions of the specified format
			/// </summary>
			/// <param name="format">
			/// Format to get the size for
			/// </param>
			public Point this[DataFormatOption format]
			{
				get
				{
					return this.dimensions[format];
				}
			}
Ejemplo n.º 7
0
		/// <summary>
		/// Sets the VideoCamera's data format. Support function for VideoCamera.DataFormat property.
		/// </summary>
		/// <param name="format">
		/// Format to change the video camera to
		/// </param>
		protected void SetDataFormat(VideoCamera.DataFormatOption format)
		{
			// change imagemap that's waiting cause format has changed
			this.UpdateNextFrameImageMap();
			
			// change format
			int result = KinectNative.freenect_set_video_format(this.parentDevice.devicePointer, format);
			if(result != 0)
			{
				throw new Exception("Could not switch to video format " + format + ". Error Code: " + result);
			}
			this.dataFormat = format;
		}
Ejemplo n.º 8
0
		/// <summary>
		/// Sets the DepthCameras's data format. Support function for DepthCamera.DataFormat
		/// </summary>
		/// <param name="format">
		/// A <see cref="DepthCamera.DataFormatOptions"/>
		/// </param>
		private void SetDataFormat(DepthCamera.DataFormatOption format)
		{
			// change depth map that's waiting cause format has changed
			this.UpdateNextFrameDepthMap();
			
			int result = KinectNative.freenect_set_depth_format(this.parentDevice.devicePointer, format);
			if(result != 0)
			{
				throw new Exception("Could not switch to depth format " + format + ". Error Code: " + result);
			}
			this.dataFormat = format;
		}