예제 #1
0
 public static LEAP_VECTOR ToCVector(this Vector3 vector) {
   LEAP_VECTOR cVector = new LEAP_VECTOR();
   cVector.x = vector.x;
   cVector.y = vector.y;
   cVector.z = vector.z;
   return cVector;
 }
예제 #2
0
 public static ReturnStatus AddPoint(ref LEAP_IE_KABSCH kabsch,
                                  ref LEAP_VECTOR point1,
                                  ref LEAP_VECTOR point2,
                                      float weight) {
   var rs = LeapIEKabschAddPoint(ref kabsch, ref point1, ref point2, weight);
   Logger.HandleReturnStatus("AddPoint", LogLevel.AllCalls, rs);
   return rs;
 }
예제 #3
0
 public static ReturnStatus AddNormal(ref LEAP_IE_KABSCH kabsch,
                                   ref LEAP_VECTOR normal1,
                                   ref LEAP_VECTOR normal2,
                                       float weight) {
   var rs = LeapIEKabschAddNormal(ref kabsch, ref normal1, ref normal2, weight);
   Logger.HandleReturnStatus("AddNormal", LogLevel.AllCalls, rs);
   return rs;
 }
 public Vector PixelToRectilinear(Image.CameraType camera, Vector pixel) {
   LEAP_VECTOR pixelStruct = new LEAP_VECTOR(pixel);
   LEAP_VECTOR ray = LeapC.LeapPixelToRectilinear(_leapConnection,
          (camera == Image.CameraType.LEFT ?
          eLeapPerspectiveType.eLeapPerspectiveType_stereo_left :
          eLeapPerspectiveType.eLeapPerspectiveType_stereo_right),
          pixelStruct);
   return new Vector(ray.x, ray.y, ray.z);
 }
 public Vector RectilinearToPixel(Image.CameraType camera, Vector ray) {
   LEAP_VECTOR rayStruct = new LEAP_VECTOR(ray);
   LEAP_VECTOR pixel = LeapC.LeapRectilinearToPixel(_leapConnection,
          (camera == Image.CameraType.LEFT ?
          eLeapPerspectiveType.eLeapPerspectiveType_stereo_left :
          eLeapPerspectiveType.eLeapPerspectiveType_stereo_right),
          rayStruct);
   return new Vector(pixel.x, pixel.y, pixel.z);
 }
예제 #6
0
 private static extern ReturnStatus LeapIEKabschAddNormal(ref LEAP_IE_KABSCH kabsch,
                                                       ref LEAP_VECTOR normal1,
                                                       ref LEAP_VECTOR normal2,
                                                           float weight);
예제 #7
0
 public static ReturnStatus GetScale(ref LEAP_IE_KABSCH kabsch,
                                  out LEAP_VECTOR translation) {
   var rs = LeapIEKabschGetScale(ref kabsch, out translation);
   Logger.HandleReturnStatus("GetScale", LogLevel.AllCalls, rs);
   return rs;
 }
예제 #8
0
 private static extern ReturnStatus LeapIEKabschGetScale(ref LEAP_IE_KABSCH kabsch,
                                                      out LEAP_VECTOR translation);
예제 #9
0
 public static ReturnStatus SolveWithPlanar(ref LEAP_IE_KABSCH kabsch,
                                         ref LEAP_VECTOR planeNormal) {
   var rs = LeapIEKabschSolveWithPlanar(ref kabsch, ref planeNormal);
   Logger.HandleReturnStatus("SolveWithPlanar", LogLevel.AllCalls, rs);
   return rs;
 }
예제 #10
0
 private static extern ReturnStatus LeapIEKabschSolveWithPlanar(ref LEAP_IE_KABSCH kabsch,
                                                             ref LEAP_VECTOR planeNormal);
예제 #11
0
 public static ReturnStatus SolveWithPivot(ref LEAP_IE_KABSCH kabsch,
                                        ref LEAP_VECTOR pivot) {
   var rs = LeapIEKabschSolveWithPivot(ref kabsch, ref pivot);
   Logger.HandleReturnStatus("SolveWithPivot", LogLevel.AllCalls, rs);
   return rs;
 }
 protected void performSolve() {
   switch (_solveMethod) {
     case SolveMethod.SixDegreeSolve:
       KabschC.Solve(ref _kabsch);
       break;
     case SolveMethod.PivotAroundOrigin:
       LEAP_VECTOR v = new LEAP_VECTOR();
       v.x = v.y = v.z = 0;
       KabschC.SolveWithPivot(ref _kabsch, ref v);
       break;
   }
 }
예제 #13
0
 private static extern ReturnStatus LeapIEKabschAddPoint(ref LEAP_IE_KABSCH kabsch,
                                                      ref LEAP_VECTOR point1,
                                                      ref LEAP_VECTOR point2,
                                                          float weight);
예제 #14
0
 public LEAP_MATRIX(Leap.Matrix leap)
 {
   x_basis = new LEAP_VECTOR(leap.xBasis);
   y_basis = new LEAP_VECTOR(leap.yBasis);
   z_basis = new LEAP_VECTOR(leap.zBasis);
 }
예제 #15
0
 public static extern LEAP_VECTOR  LeapRectilinearToPixel(IntPtr hConnection, eLeapPerspectiveType camera, LEAP_VECTOR rectilinear);
예제 #16
0
 public static extern LEAP_VECTOR  LeapPixelToRectilinear(IntPtr hConnection, eLeapPerspectiveType camera, LEAP_VECTOR pixel);
예제 #17
0
 public static extern LEAP_VECTOR LeapRectilinearToPixelEx(IntPtr hConnection,
                                                           IntPtr hDevice, eLeapPerspectiveType camera, eLeapCameraCalibrationType calibrationType, LEAP_VECTOR rectilinear);
예제 #18
0
 public LEAP_MATRIX(Leap.Matrix leap)
 {
     x_basis = new LEAP_VECTOR(leap.xBasis);
     y_basis = new LEAP_VECTOR(leap.yBasis);
     z_basis = new LEAP_VECTOR(leap.zBasis);
 }
예제 #19
-1
 private static extern ReturnStatus LeapIEKabschSolveWithPivot(ref LEAP_IE_KABSCH kabsch,
                                                            ref LEAP_VECTOR pivot);