PlannedDirection() public static method

public static PlannedDirection ( ) : Vector3
return Vector3
Beispiel #1
0
 private Vector PlannedVector()
 {
     if (shared.Vessel != FlightGlobals.ActiveVessel)
     {
         throw new KOSException("You may only call addons:TR:plannedVect from the active vessel. Always check addons:tr:hasImpact");
     }
     if (Available())
     {
         Vector3 vect = TRWrapper.PlannedDirection();
         return(new Vector(vect.x, vect.y, vect.z));
     }
     throw new KOSUnavailableAddonException("PLANNEDDIRECTION", "Trajectories");
 }
Beispiel #2
0
 private Vector PlannedVector()
 {
     if (shared.Vessel != FlightGlobals.ActiveVessel)
     {
         throw new KOSException("You may only call addons:TR:plannedVect from the active vessel and must also have a trajectories target set." +
                                " Always check addons:tr:HasImpact and addons:tr:HasTarget");
     }
     if (Available())
     {
         Vector3?vect = TRWrapper.PlannedDirection();
         if (vect != null)
         {
             Vector3 vector = (Vector3)vect;
             return(new Vector(vector.x, vector.y, vector.z));
         }
         throw new KOSException("Planned Vector is not available. Remember to check addons:tr:HasImpact and addons:tr:HasTarget");
     }
     throw new KOSUnavailableAddonException("PLANNEDDIRECTION", "Trajectories");
 }