Ejemplo n.º 1
0
 public static Rotation3 Lerp(Rotation3 v1, Rotation3 v2, float amount)
 {
     if (amount < 0)
     {
         return(v1);
     }
     if (amount > 1)
     {
         return(v2);
     }
     return(new Rotation3(v1.Yaw + (v2.Yaw - v1.Yaw) * amount,
                          v1.Pitch + (v2.Pitch - v1.Pitch) * amount,
                          v1.Roll + (v2.Roll - v1.Roll) * amount));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// set the exact camera rotation
 /// </summary>
 /// <param name="rots">x = yaw, y = pitch, z = roll</param>
 public void SetRotation(Rotation3 rots)
 {
     pitch = rots.Pitch;
     yaw   = rots.Yaw;
     roll  = rots.Roll;
 }