00001 /*** 00002 Basic structure for streamline 00003 ***/ 00004 #ifndef _TRAJECTORY_H 00005 #define _TRAJECTORY_H 00006 #include "dataStructure.h" 00007 class Trajectory{ 00008 00009 public: 00010 int index; 00011 int nlinesegs; 00012 int curMaxNumLinesegs; 00013 LineSeg *linesegs; 00014 unsigned char roadtype; /*record the road type for street modeling*/ 00015 bool closed; 00016 bool is_mapboundary; /* record whether it is the boundaries of a loaded map */ 00017 00018 int saddleID; /*which saddle this trajectory belongs to*/ 00019 int degpt_id; 00020 int linked_degpt_id; 00021 int degpt_sep_index; 00022 double eulerstep_scalar; 00023 00024 double traj_len; 00025 float infoGain; 00026 bool is_reach_degpt; 00027 bool is_reach_unknown; 00028 /*Construct the trajectory*/ 00029 Trajectory(int index, int curMaxNum); 00030 00031 ~Trajectory(); 00032 //void setGlview(GlView *glviewS); 00033 bool store_to_global_line_segs(CurvePoints *temp, int num); 00034 00035 /*extend the line segment list if there is not enough space left*/ 00036 bool extend_line_segments(int add_size); 00037 00038 //get the length of the trajectory 00039 double get_length(); 00040 00041 00042 //remove the front n line segments 00043 bool remove_front_nlines(int n); 00044 00045 //add n new line segments in the front 00046 bool add_front_nlines(LineSeg *, int); 00047 00048 //remove the last n line segments 00049 bool remove_last_nlines(int n); 00050 00051 //add n new line segments at the end 00052 bool add_last_nlines(LineSeg *, int); 00053 00054 00055 //reverse the trajectory 00056 //bool reverse_lines(); 00057 //int trace_in_quad(int &face_id, double globalp[2], int type, int &flag); 00058 00059 }; //end of Trajectory class 00060 #endif