Example #1
0
        public Vector RectilinearToPixel(Image.PerspectiveType camera, Vector ray)
        {
            LEAP_VECTOR rayStruct = new LEAP_VECTOR(ray);
            LEAP_VECTOR pixel     = LeapC.LeapRectilinearToPixel(_leapConnection,
                                                                 (camera == Image.PerspectiveType.STEREO_LEFT ?
                                                                  eLeapPerspectiveType.eLeapPerspectiveType_stereo_left :
                                                                  eLeapPerspectiveType.eLeapPerspectiveType_stereo_right),
                                                                 rayStruct);

            return(new Vector(pixel.x, pixel.y, pixel.z));
        }
Example #2
0
        public Vector PixelToRectilinear(Image.PerspectiveType camera, Vector pixel)
        {
            LEAP_VECTOR pixelStruct = new LEAP_VECTOR(pixel);
            LEAP_VECTOR ray         = LeapC.LeapPixelToRectilinear(_leapConnection,
                                                                   (camera == Image.PerspectiveType.STEREO_LEFT ?
                                                                    eLeapPerspectiveType.eLeapPerspectiveType_stereo_left :
                                                                    eLeapPerspectiveType.eLeapPerspectiveType_stereo_right),
                                                                   pixelStruct);

            return(new Vector(ray.x, ray.y, ray.z));
        }