Beispiel #1
0
 /// <summary>
 /// The actual movement directions
 /// High Tolerance
 /// </summary>
 /// <param name="type">Joint</param>
 /// <returns>Enumerable of the directions</returns>
 public IEnumerable <Direction> GetAbsoluteMovement(JointType type)
 {
     if (!HasSkeleton(1))
     {
         return(new List <Direction> {
             Direction.None
         });
     }
     return(SkeletonMath.DirectionTo(person.GetLastSkeleton(1).GetPosition(type), person.CurrentSkeleton.GetPosition(type)));
 }
Beispiel #2
0
 /// <summary>
 /// The actual direction of movement to a relative point
 /// </summary>
 /// <param name="steady">The reference joint</param>
 /// <param name="moving">The joint for the direction</param>
 /// <returns>Enumerable of the directions</returns>
 public IEnumerable <Direction> GetRelativeMovement(JointType steady, JointType moving)
 {
     if (!HasSkeleton(1))
     {
         return(new List <Direction> {
             Direction.None
         });
     }
     return(SkeletonMath.DirectionTo(SkeletonMath.SubstractPoints(person.GetLastSkeleton(1).GetPosition(moving), person.GetLastSkeleton(1).GetPosition(steady)),
                                     SkeletonMath.SubstractPoints(person.CurrentSkeleton.GetPosition(moving), person.CurrentSkeleton.GetPosition(steady))));
 }
Beispiel #3
0
 /// <summary>
 /// The static position of a joint in relation to another
 /// </summary>
 /// <param name="from">source of the direction</param>
 /// <param name="to">target of the direction</param>
 /// <returns>Enumerable of the directions</returns>
 public IEnumerable <Direction> GetRelativePosition(JointType from, JointType to)
 {
     return(SkeletonMath.DirectionTo(person.CurrentSkeleton.GetPosition(from), person.CurrentSkeleton.GetPosition(to)));
 }