예제 #1
0
 public InteractionBox toInteractionBox()
 {
     return(new InteractionBox(
                center.toVector(),
                size.toVector()
                ));
 }
예제 #2
0
 public Finger toFinger()
 {
     Bone[] b = new Bone[4];
     for (int i = 0; i < _bones.Length; ++i)
     {
         b[i] = _bones[i].toBone();
     }
     return(new Finger(
                _frameId,
                HandId,
                Id,
                TimeVisible,
                TipPosition.toVector(),
                TipVelocity.toVector(),
                Direction.toVector(),
                StabilizedTipPosition.toVector(),
                Width,
                Length,
                IsExtended,
                Type,
                b[0],
                b[1],
                b[2],
                b[3]));
 }
예제 #3
0
        public Hand toHand()
        {
            List <Finger> f = new List <Finger>();

            foreach (SerializableFinger sf in Fingers)
            {
                f.Add(sf.toFinger());
            }
            return(new Hand(
                       frameId,
                       id,
                       confidence,
                       grabStrength,
                       grabAngle,
                       pinchStrength,
                       pinchDistance,
                       palmWidth,
                       isLeft,
                       timeVisible,
                       arm.toArm(),
                       f,
                       PalmPosition.toVector(),
                       StabilizedPalmPosition.toVector(),
                       PalmVelocity.toVector(),
                       PalmNormal.toVector(),
                       Direction.toVector(),
                       WristPosition.toVector()
                       ));
        }
예제 #4
0
 public Arm toArm()
 {
     return(new Arm(
                prevJoint.toVector(),
                nextJoint.toVector(),
                center.toVector(),
                direction.toVector(),
                length,
                width,
                rotation.toLeapQuaternion()
                ));
 }
예제 #5
0
 public Bone toBone()
 {
     return(new Bone(
                prevJoint.toVector(),
                nextJoint.toVector(),
                center.toVector(),
                direction.toVector(),
                length,
                width,
                type,
                rotation.toLeapQuaternion()
                ));
 }