Exemplo n.º 1
0
 public virtual SimRoute AppendPoint(SimWaypoint vector3, double fudge)
 {
     if (EndNode.Distance(vector3) < fudge)
     {
         return(new SimRoute(StartNode, vector3));
     }
     return(Append(new SimRoute(EndNode, vector3)));
 }
Exemplo n.º 2
0
        //public void FromFileString(String s)
        //{
        //    string[] args = s.Split(null);
        //    StartNode = SimWaypoint.Create(new Vector3d(double.Parse(args[0]), double.Parse(args[1]), double.Parse(args[2])));
        //    EndNode = SimWaypoint.Create(new Vector3d(double.Parse(args[4]), double.Parse(args[5]), double.Parse(args[6])));
        //   // if (s.Contains("MustAutoPilot")) MustAutoPilot = true;
        //    if (s.Contains("MustFly")) MustFly = true;
        //    if (s.Contains("MustCrouch")) MustCrouch = true;
        //    if (s.Contains("IsBlocked")) IsBlocked = true;
        //   // if (s.Contains("IsOneDirrection")) IsOneDirrection = true;
        //}

        public virtual bool NearPoint(SimWaypoint e, double maxDist)
        {
            if (StartNode.Distance(e) < maxDist)
            {
                return(true);
            }
            if (EndNode.Distance(e) < maxDist)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 3
0
 public override bool NearPoint(SimWaypoint e, double maxDist)
 {
     if (StartNode.Distance(e) < maxDist)
     {
         return(true);
     }
     if (EndNode.Distance(e) < maxDist)
     {
         return(true);
     }
     foreach (SimRoute move in MoveList)
     {
         if (move.NearPoint(e, maxDist))
         {
             return(true);
         }
     }
     return(false);
 }