/[zanavi_public1]/navit/navit/route.h
ZANavi

Diff of /navit/navit/route.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2 Revision 27
101 struct vehicle *v; 101 struct vehicle *v;
102 int try_harder; 102 int try_harder;
103}; 103};
104 104
105 105
106/**
107 * @brief Usually represents a destination or position
108 *
109 * This struct usually represents a destination or position
110 */
106struct route_info; 111struct route_info
112{
113 struct coord c; /**< The actual destination / position */
114 struct coord lp; /**< The nearest point on a street to c */
115 int pos; /**< The position of lp within the coords of the street */
116 int lenpos; /**< Distance between lp and the end of the street */
117 int lenneg; /**< Distance between lp and the start of the street */
118 int lenextra; /**< Distance between lp and c */
119 int percent; /**< ratio of lenneg to lenght of whole street in percent */
120 struct street_data *street; /**< The street lp is on */
121 int street_direction; /**< Direction of vehicle on street -1 = Negative direction, 1 = Positive direction, 0 = Unknown */
122 int dir; /**< Direction to take when following the route -1 = Negative direction, 1 = Positive direction */
123};
124
107struct street_data; 125struct street_data;
108struct tracking; 126struct tracking;
109struct vehicleprofile; 127struct vehicleprofile;
110struct route *route_new(struct attr *parent, struct attr **attrs); 128struct route *route_new(struct attr *parent, struct attr **attrs);
111void route_set_mapset(struct route *this_, struct mapset *ms); 129void route_set_mapset(struct route *this_, struct mapset *ms);
118int route_destination_reached(struct route *this_); 136int route_destination_reached(struct route *this_);
119void route_set_position(struct route *this_, struct pcoord *pos); 137void route_set_position(struct route *this_, struct pcoord *pos);
120void route_set_position_from_tracking(struct route *this_, struct tracking *tracking, enum projection pro); 138void route_set_position_from_tracking(struct route *this_, struct tracking *tracking, enum projection pro);
121struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs); 139struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs);
122void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async); 140void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
141void route_add_destination(struct route *this, struct pcoord *dst, int async);
123int route_get_destinations(struct route *this_, struct pcoord *pc, int count); 142int route_get_destinations(struct route *this_, struct pcoord *pc, int count);
124void route_set_destination(struct route *this_, struct pcoord *dst, int async); 143void route_set_destination(struct route *this_, struct pcoord *dst, int async);
125void route_remove_waypoint(struct route *this_); 144void route_remove_waypoint(struct route *this_);
126struct coord route_get_coord_dist(struct route *this_, int dist); 145struct coord route_get_coord_dist(struct route *this_, int dist);
127struct street_data *street_get_data(struct item *item); 146struct street_data *street_get_data(struct item *item);
139struct attr_iter * route_attr_iter_new(void); 158struct attr_iter * route_attr_iter_new(void);
140void route_attr_iter_destroy(struct attr_iter *iter); 159void route_attr_iter_destroy(struct attr_iter *iter);
141int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter); 160int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
142void route_init(void); 161void route_init(void);
143void route_destroy(struct route *this_); 162void route_destroy(struct route *this_);
163void route_path_destroy(struct route_path *this, int recurse);
164void route_graph_destroy(struct route_graph *this);
144/* end of prototypes */ 165/* end of prototypes */
145#ifdef __cplusplus 166#ifdef __cplusplus
146} 167}
147#endif 168#endif
148 169

Legend:
Removed from v.2  
changed lines
  Added in v.27

   
Visit the ZANavi Wiki