Esempio n. 1
0
 public static double Length(this Microsoft.Kinect.CameraSpacePoint point)
 {
     return(Math.Sqrt(
                Math.Pow(point.X, 2) +
                Math.Pow(point.Y, 2) +
                Math.Pow(point.Z, 2)
                ));
 }
Esempio n. 2
0
        public static Point ToPoint(this Microsoft.Kinect.CameraSpacePoint position, CoordinateMapper coordinateMapper)
        {
            Point point = new Point();

            ColorSpacePoint colorPoint = coordinateMapper.MapCameraPointToColorSpace(position);

            point.X = float.IsInfinity(colorPoint.X) ? 0.0 : colorPoint.X;
            point.Y = float.IsInfinity(colorPoint.Y) ? 0.0 : colorPoint.Y;

            return(point);
        }