Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        // ![](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)));
        }
Ejemplo n.º 3
0
 public Finger2d(Finger finger)
 {
     TipPosition = LeapCalibrator.ToScaledPoint(finger.TipPosition);
 }
Ejemplo n.º 4
0
 public FingerBone(ScaledPoint center, double scaledLength, DndCore.Vector direction)
 {
     Center       = center;
     ScaledLength = scaledLength;
     Direction    = direction;
 }