示例#1
0
        public virtual double Distance(Vector3d P)
        {
            if (minX == maxX || minY == maxY) // vertical or horizontal
            {
                if (InRouteBox(P))            // not outside the box
                {
                    return(0);
                }
            }
            Vector3d Projection = ProjectOnLine(P, _StartNode.Position, _EndNode.Position);

            return(SimPathStore.DistanceNoZ(Projection, P));
        }
 public double Distance(Vector3d P)
 {
     return(SimPathStore.DistanceNoZ(P, _GlobalPos));
 }
 public static double Distance(SimWaypoint wp1, SimWaypoint wp2)
 {
     return(SimPathStore.DistanceNoZ(wp1.Position, wp2.Position));
 }
 public double Distance(SimPosition other)
 {
     return(SimPathStore.DistanceNoZ(GlobalPosition, other.GlobalPosition));
 }
示例#5
0
 public static double DistanceNoZ(Vector3d a, Vector3d b)
 {
     return(SimPathStore.DistanceNoZ(a, b));
 }