Ejemplo n.º 1
0
        public static Angles FromAtVector(Vec3f at)
        {
            var angles = new Angles();

            angles.SetByAtVector(at);
            return(angles);
        }
Ejemplo n.º 2
0
 /// <summary> Returns the signed difference on a [-pi, pi] scale between two angles. </summary>
 public static Angles Difference(Angles angles1, Angles angles2)
 {
     return(new Angles()
     {
         Pitch = Difference(angles1.Pitch, angles2.Pitch),
         Yaw = Difference(angles1.Yaw, angles2.Yaw),
         Roll = Difference(angles1.Roll, angles2.Roll)
     });
 }
Ejemplo n.º 3
0
 // for npc updates
 public bool DifferenceIsBigger(Angles angles2, float maxDiff)
 {
     if (Math.Abs(Difference(Yaw, angles2.Yaw)) > maxDiff)
     {
         return(true);
     }
     else if (Math.Abs(Difference(Pitch, angles2.Pitch)) > maxDiff)
     {
         return(true);
     }
     else if (Math.Abs(Difference(Roll, angles2.Roll)) > maxDiff)
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 public PosAng(Vec3f position, Angles angles)
 {
     this.Position = position;
     this.Angles   = angles;
 }