@@ -312,6 +312,28 @@ impl Connection {
312312 }
313313 }
314314
315+ #[ doc = " Returns an OpenCV-compatible camera matrix." ]
316+ #[ doc = " @param hConnection The connection handle created by LeapCreateConnection()." ]
317+ #[ doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration" ]
318+ #[ doc = " @param[out] dest A pointer to a single-precision float array of size 9" ]
319+ #[ doc = " @since 3.2.1" ]
320+ pub fn camera_matrix ( & mut self , camera : PerspectiveType , dest : & mut [ f32 ; 9 ] ) {
321+ unsafe { LeapCameraMatrix ( self . handle , camera. into ( ) , dest. as_mut_ptr ( ) ) }
322+ }
323+
324+ #[ doc = " Returns an OpenCV-compatible lens distortion using the 8-parameter rational" ]
325+ #[ doc = " model." ]
326+ #[ doc = "" ]
327+ #[ doc = " The order of the returned array is: [k1, k2, p1, p2, k3, k4, k5, k6]" ]
328+ #[ doc = "" ]
329+ #[ doc = " @param hConnection The connection handle created by LeapCreateConnection()." ]
330+ #[ doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration" ]
331+ #[ doc = " @param[out] dest A pointer to a single-precision float array of size 8." ]
332+ #[ doc = " @since 3.2.1" ]
333+ pub fn distortion_coeffs ( & mut self , camera : PerspectiveType , dest : & mut [ f32 ; 8 ] ) {
334+ unsafe { LeapDistortionCoeffs ( self . handle , camera. into ( ) , dest. as_mut_ptr ( ) ) }
335+ }
336+
315337 #[ doc = " Provides the corrected camera ray intercepting the specified point on the image." ]
316338 #[ doc = "" ]
317339 #[ doc = " Given a point on the image, ``LeapPixelToRectilinear()`` corrects for camera distortion" ]
@@ -521,28 +543,6 @@ impl Connection {
521543 }
522544 }
523545
524- #[ doc = " Returns an OpenCV-compatible camera matrix." ]
525- #[ doc = " @param hConnection The connection handle created by LeapCreateConnection()." ]
526- #[ doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration" ]
527- #[ doc = " @param[out] dest A pointer to a single-precision float array of size 9" ]
528- #[ doc = " @since 3.2.1" ]
529- pub fn camera_matrix ( & mut self , camera : PerspectiveType , dest : & mut [ f32 ; 9 ] ) {
530- unsafe { LeapCameraMatrix ( self . handle , camera. into ( ) , dest. as_mut_ptr ( ) ) }
531- }
532-
533- #[ doc = " Returns an OpenCV-compatible lens distortion using the 8-parameter rational" ]
534- #[ doc = " model." ]
535- #[ doc = "" ]
536- #[ doc = " The order of the returned array is: [k1, k2, p1, p2, k3, k4, k5, k6]" ]
537- #[ doc = "" ]
538- #[ doc = " @param hConnection The connection handle created by LeapCreateConnection()." ]
539- #[ doc = " @param camera The camera to use, a member of the eLeapPerspectiveType enumeration" ]
540- #[ doc = " @param[out] dest A pointer to a single-precision float array of size 8." ]
541- #[ doc = " @since 3.2.1" ]
542- pub fn distortion_coeffs ( & mut self , camera : PerspectiveType , dest : & mut [ f32 ; 8 ] ) {
543- unsafe { LeapDistortionCoeffs ( self . handle , camera. into ( ) , dest. as_mut_ptr ( ) ) }
544- }
545-
546546 #[ doc = " For a multi-device aware client, sets the device to use in the context of" ]
547547 #[ doc = " non-\" Ex\" API functions which are logically device-specific but don't provide" ]
548548 #[ doc = " a device parameter." ]
0 commit comments