Exemplo n.º 1
0
 public override double Evaluate(Tracks tracks)
 {
     List<Position3D> t = tracks.tracks;
     int cur = tracks.tracks.Count - 1;
     int pre = cur - 1;
     if (t[pre].Y > Pos.Y && t[cur].Y < Pos.Y)
     {
         double X = (t[cur].X + t[pre].X) / 2;
         double Z = (t[cur].Z + t[pre].Z) / 2;
         double r = Math.Sqrt(Math.Pow((X - Pos.X), 2) + Math.Pow((Z - Pos.Z), 2));
         if (r < radius)
         {
             //System.Console.WriteLine("X : " + X + " Z : " + Z);
             return t[pre].Y - t[cur].Y;
         }
     }
     return -1;
 }
Exemplo n.º 2
0
 public abstract double Evaluate(Tracks tracks);