public void CalibrationPointUpdated(LeapMotionCalibrationStep leapMotionCalibrationStep, Point position, DndCore.Vector point3D, double scale) { switch (leapMotionCalibrationStep) { case LeapMotionCalibrationStep.BackUpperLeft: skeletalData2d.BackPlane.UpperLeft2D = Point2D.From(position); skeletalData2d.BackPlane.UpperLeft = ScaledPoint.From(point3D, scale); break; case LeapMotionCalibrationStep.BackLowerRight: skeletalData2d.BackPlane.LowerRight2D = Point2D.From(position); skeletalData2d.BackPlane.LowerRight = ScaledPoint.From(point3D, scale); break; case LeapMotionCalibrationStep.FrontUpperLeft: skeletalData2d.FrontPlane.UpperLeft2D = Point2D.From(position); skeletalData2d.FrontPlane.UpperLeft = ScaledPoint.From(point3D, scale); break; case LeapMotionCalibrationStep.FrontLowerRight: skeletalData2d.FrontPlane.LowerRight2D = Point2D.From(position); skeletalData2d.FrontPlane.LowerRight = ScaledPoint.From(point3D, scale); break; } }
// ![](B0D2EA3807AA73CED7E27A1205328BF7.png;;;0.01721,0.01721) FingerBone GetBone(Finger finger, Bone.BoneType boneType) { Bone bone = finger.Bone(boneType); ScaledPoint centerPt = LeapCalibrator.ToScaledPoint(bone.Center); return(new FingerBone(centerPt, bone.Length * centerPt.Scale, new DndCore.Vector(bone.Direction.x, bone.Direction.y))); }
public Finger2d(Finger finger) { TipPosition = LeapCalibrator.ToScaledPoint(finger.TipPosition); }
public FingerBone(ScaledPoint center, double scaledLength, DndCore.Vector direction) { Center = center; ScaledLength = scaledLength; Direction = direction; }