Changeset 2459 for trunk/map

Show
Ignore:
Timestamp:
09/26/05 16:01:16 (5 years ago)
Author:
marius
Message:

updates bugfixes

Location:
trunk/map
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/map/include/pimp.h

    • Property cvs2svn:cvs-rev changed from 1.18 to 1.19
    r2458 r2459  
    7979 
    8080// number of instances of this module 
    81 static int num_of_uids = 0; 
     81//static int num_of_uids = 0; 
    8282     
    8383struct point_coords { /*{{{*/ 
     
    636636                         
    637637                public: 
    638          
     638 
    639639        double degree; 
    640640 
     
    663663/** 
    664664 * $Log$ 
    665  * Revision 1.18  2005/09/26 12:09:36  marius 
    666  * kleine aenderungen 
     665 * Revision 1.19  2005/09/26 14:01:16  marius 
     666 * updates bugfixes 
    667667 * 
    668668 * Revision 1.17  2005/09/24 17:24:35  marius 
  • trunk/map/src/pimp.cpp

    • Property cvs2svn:cvs-rev changed from 1.16 to 1.17
    r2435 r2459  
    183183    // (4215,-2345)==(8,82481,53,08435) 
    184184     
    185     Pimp::Pimp() { /*{{{*/ 
    186         num_of_uids++; 
    187         uid = num_of_uids; 
    188         } /*}}}*/ 
    189          
    190     Pimp::~Pimp(void) { /*{{{*/ 
    191         num_of_uids--; 
    192     } /*}}}*/ 
     185//    Pimp::Pimp() { /*{{{*/ 
     186//      num_of_uids++; 
     187//      uid = num_of_uids; 
     188//      } /*}}}*/ 
     189         
     190//    Pimp::~Pimp(void) { /*{{{*/ 
     191//      num_of_uids--; 
     192//    } /*}}}*/ 
    193193 
    194194void View::refresh_degree() 
     
    196196                double degree=compass.get_news(); 
    197197        } 
     198         
     199         
    198200 
    199201bool View::dist(int i) 
     
    502504/** 
    503505 * $Log$ 
     506 * Revision 1.17  2005/09/26 14:01:16  marius 
     507 * updates bugfixes 
     508 * 
    504509 * Revision 1.16  2005/09/24 17:24:35  marius 
    505510 * update 
  • trunk/map/src/test.cpp

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r2360 r2459  
    7171int num_of_goals; 
    7272 
    73 int main(int argc, char *argv[]) { /*{{{*/ 
     73int main() { /*{{{*/ 
    7474 
    75     // TEMP /////////////////////////////////// 
     75    cout << "Testklasse f�itag" << endl; 
     76    cout << "Geben Sie einen Betrachtungswinkel ein, in dessen Richtung sie schauen." << endl; 
     77    cout << "0 Grad ist Norden, 90 Grad ist Osten, 180 Grad ist S�nd 270 Grad ist Westen." << endl; 
     78 
     79    int a; 
    7680     
    77     Pimp pimptest; 
    78      
    79     point_spatial p, q1, q2, q3, q4; 
    80      
    81     // Drehsinn muss Uhrzeigersinn sein 
    82     q1.x = 0;   q1.y = 30; 
    83     q2.x = 15;  q2.y = 55;     
    84     q3.x = 65;  q3.y = 25; 
    85     q4.x = 50;  q4.y = 0; 
    86  
    87     cout << "Hier MUSS immer stehen: Punkt drin" << endl; 
    88      
    89     p.x = 32;   p.y = 27; 
    90     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 1. Punkt drin" << endl; else cout << " 1. Punkt nicht drin" << endl; 
    91     p.x = 1;    p.y = 30; 
    92     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 2. Punkt drin" << endl; else cout << " 2. Punkt nicht drin" << endl; 
    93     p.x = 50;   p.y = 1; 
    94     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 3. Punkt drin" << endl; else cout << " 3. Punkt nicht drin" << endl; 
    95     p.x = 64;   p.y = 25; 
    96     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 4. Punkt drin" << endl; else cout << " 4. Punkt nicht drin" << endl; 
    97     p.x = 15;   p.y = 54; 
    98     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 5. Punkt drin" << endl; else cout << " 5. Punkt nicht drin" << endl; 
    99     p.x = 25;   p.y = 16; 
    100     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 6. Punkt drin" << endl; else cout << " 6. Punkt nicht drin" << endl; 
    101     p.x = 57;   p.y = 13; 
    102     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 7. Punkt drin" << endl; else cout << " 7. Punkt nicht drin" << endl; 
    103      
    104     cout << "Hier MUSS immer stehen: Punkt nicht drin" << endl; 
    105      
    106     p.x = 65;   p.y = -1; 
    107     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 8. Punkt drin" << endl; else cout << " 8. Punkt nicht drin" << endl; 
    108     p.x = 25;   p.y = -14; 
    109     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << " 9. Punkt drin" << endl; else cout << " 9. Punkt nicht drin" << endl; 
    110     p.x = 66;   p.y = 25; 
    111     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << "10. Punkt drin" << endl; else cout << "10. Punkt nicht drin" << endl; 
    112     p.x = 2;    p.y = 57; 
    113     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << "11. Punkt drin" << endl; else cout << "11. Punkt nicht drin" << endl; 
    114     p.x = 64;   p.y = 54; 
    115     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << "12. Punkt drin" << endl; else cout << "12. Punkt nicht drin" << endl; 
    116     p.x = -1;   p.y = -1; 
    117     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << "13. Punkt drin" << endl; else cout << "13. Punkt nicht drin" << endl; 
    118     p.x = 66;   p.y = 56; 
    119     if (pimptest.point_in_quad(p, q1, q2, q3, q4)) cout << "14. Punkt drin" << endl; else cout << "14. Punkt nicht drin" << endl; 
    120      
    121     /////////////////////////////////////////// 
    122      
    123      
    124     // Initialisierung 
    125     MapTest maptest; 
    126     maptest.set_min_spatial_extend(200.0); 
    127     maptest.set_max_spatial_extend(2000.0); 
    128     maptest.set_mapsize_x(500); 
    129     maptest.set_mapsize_y(500); 
    130      
    131     // Beispielaufruf zum Testen von get_tile 
    132     // maptest.get_tile(0, 0, 2000, 2000, 500, 500, "test_get_tile.jpg"); 
    133      
    134     // Ziel-Liste anlegen 
    135     num_of_goals = 1; 
    136     goal_list = new point_spatial[num_of_goals]; 
    137     goal_list[0].x = 3000; 
    138     goal_list[0].y = 1000; 
    139     maptest.set_goal_list(goal_list, num_of_goals); 
    140     
    141     // Warten zum Kartenladen 
    142     sleep(10); 
    143      
    144     // Daten angeben, welchen Kartenausschnitt man haben m�e (Parameter in pimp.h erkl�) 
    145     // MapData md(8.85582, 53.10345, 400, 400, 4000); 
    146  
    147     MapData md(3000, 1000, 500, 500, 1000); 
    148     mapdata_ausgabe(md); 
    149     maptest.get_map(md, "test0.jpg"); 
    150     
    151     return 0; 
     81    double get_news(); 
     82       { 
     83         cin >> a;        
     84       } 
    15285 
    15386} /*}}}*/ 
     
    15689/** 
    15790 * $Log$ 
     91 * Revision 1.5  2005/09/26 14:01:16  marius 
     92 * updates bugfixes 
     93 * 
    15894 * Revision 1.4  2005/09/20 14:13:54  marius 
    15995 * compilierbar aber noch nicht fertig