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; }
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; }
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); }
private static extern ReturnStatus LeapIEKabschAddNormal(ref LEAP_IE_KABSCH kabsch, ref LEAP_VECTOR normal1, ref LEAP_VECTOR normal2, float weight);
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; }
private static extern ReturnStatus LeapIEKabschGetScale(ref LEAP_IE_KABSCH kabsch, out LEAP_VECTOR translation);
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; }
private static extern ReturnStatus LeapIEKabschSolveWithPlanar(ref LEAP_IE_KABSCH kabsch, ref LEAP_VECTOR planeNormal);
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; } }
private static extern ReturnStatus LeapIEKabschAddPoint(ref LEAP_IE_KABSCH kabsch, ref LEAP_VECTOR point1, ref LEAP_VECTOR point2, float weight);
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); }
public static extern LEAP_VECTOR LeapRectilinearToPixel(IntPtr hConnection, eLeapPerspectiveType camera, LEAP_VECTOR rectilinear);
public static extern LEAP_VECTOR LeapPixelToRectilinear(IntPtr hConnection, eLeapPerspectiveType camera, LEAP_VECTOR pixel);
public static extern LEAP_VECTOR LeapRectilinearToPixelEx(IntPtr hConnection, IntPtr hDevice, eLeapPerspectiveType camera, eLeapCameraCalibrationType calibrationType, LEAP_VECTOR rectilinear);
private static extern ReturnStatus LeapIEKabschSolveWithPivot(ref LEAP_IE_KABSCH kabsch, ref LEAP_VECTOR pivot);