Logo Search packages:      
Sourcecode: navit version File versions

static int route_value_seg ( struct vehicleprofile profile,
struct route_graph_point from,
struct route_graph_segment over,
int  dir 
) [static]

Returns the "costs" of driving from point from over segment over in direction dir.

profile The routing preferences
from The point where we are starting
over The segment we are using
dir The direction of segment which we are driving
The "costs" needed to drive len on item

Definition at line 1498 of file route.c.

References route_graph_segment::data, route_graph_segment::end, route_graph_point::flags, route_segment_data::flags, vehicleprofile::flags, vehicleprofile::flags_forward_mask, vehicleprofile::flags_reverse_mask, route_time_seg(), route_graph_point::seg, and route_graph_segment::start.

Referenced by route_graph_flood(), and route_path_new().

#if 0
      dbg(0,"flags 0x%x mask 0x%x flags 0x%x\n", over->flags, dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask, profile->flags);
      if ((over->data.flags & (dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask)) != profile->flags)
            return INT_MAX;
      if (dir > 0 && (over->start->flags & RP_TURN_RESTRICTION))
            return INT_MAX;
      if (dir < 0 && (over->end->flags & RP_TURN_RESTRICTION))
            return INT_MAX;
      if (from && from->seg == over)
            return INT_MAX;
      if ((over->start->flags & RP_TRAFFIC_DISTORTION) && (over->end->flags & RP_TRAFFIC_DISTORTION)) {
            struct route_traffic_distortion dist;
            if (route_get_traffic_distortion(over, &dist))
                  return route_time_seg(profile, &over->data, &dist);
      return route_time_seg(profile, &over->data, NULL);

Generated by  Doxygen 1.6.0   Back to index