Download voir rapport
Transcript
$ % & ! " # !" # $ % & ( ' ) * ) + ! ' " , * " ,, + ( --. -& -/ .0 .- .. $ . . ! . , .% # 1 " ) $ .% .( ! " # $ % & # ' ' # ) & & ( & & + , # $ - ( *+ ( & ' ( ) % .. / 3 01 # 0 ' # ' ) 4 5 5 % 5 ' 4 + & " - # % # 5 3 ' 6 ( 3 ( ' - ' 7 ' ( + 5 3 5 % '# : ; & , ) ' ( # ' ( * 5 & & " 8 5 9 , ( ' & & # # ' % 2 ! "# $ % & $ ! 6 6- * ! : ! 4 ! 7 . 8 ;1< 4= + $ / + 5 > / & ' 0 1@ 3 9 / ( ' )* ' )* & ' + . $ $ - ! , + $, / , 3. . ' )* $ 0112 ! 9 ' ' 0 /5 4 ? " 11" A ) 8A ! B # ! $ . %C . 7 , . $ $ . + 7 , 8 + 7 , 4 + ! $ 7 . ! . , % ) , 3 $ E / 4 D !! 8 . $ 4 / 4 / . $ , 7 . , 3 $ $ $ + 5 $ 5 $ 7 . G ! F . 3 / 7 F H 7 7 7 7 7 7 . 7 . 5 ! / $ 4 # ( , 7 . . . ; " 11" 0 A I7 J7 017 0 7 " I < & 017 @ J J7 017 ' )* A!! 7 7 $ $ 3% $ $ 7 7 E4 !/ + & < 01 00 5 $ 3 ! 7 ! 7 F /5 !! . 8 7 7. ! / . 7 ;7 ;7 017 * 7 "# 3 $ + 5 7 A ! 7 7 0 J7 0" 0I J7 ;7 * 3 # K 7 ! 7 $ 5 3 !! 7 $ ! $ ! + + 5 7 $ 4 $ 017 ; ' 8A . $ . !! 7 7 7 . 7 ! 7 $ 7 4 $ 00; 7 + @ $ ( ! %&! %! ) ( "# ' ! CBitmapGL " # !$ CTga %& " CTimerGLUT ' CMouse ( ' CVector ) * CCameraSystem CObject + * , CNode -. ' / CVehicle ) ' # ** $ CFrustum + ' CSkyBox 0 / , CZone 1 # $ CIntersection ) # 2 CGraph & # ** $ ' + $ ! CCity ) #* ( 1 * 4 5$ 6 CBuilding ) CTrafficLight ) * # $ CRoad ) #7 " " * ' 8 $ CCamera *" CCameraFree CCamera3Person 9 CCameraIso 9 3 ! + *+ +, ' *+ , !! " : 7 ' ' ** 7 * * * ' ' 2 2 * ** CTimerGLUT 7 # 2 $ ' ** ** " 33 ! : ' ' % #) ;$ ' * #;$ < ' ' ' #)$ = :' > ' > :' -?- # ' + $ : 1 @=-(AB;@( 2 1 C)(( )= ! ;-%()B( %;=)(B;!(-%; : =DD() ; : ;-! B%); : 1 1 1 : ' : ' " * 1 1 ! ( * * G G H F - ' " E H ( 1 # F7F 7 2 ' 1 )= ! $ 1 ** % ' " 3 ! : nomville.city : C * [Globals] largeur hauteur nbinters nbroads nbzones 2 * 1 > > * * nomville.gcity *.city // // // // taille nombre nombre nombre de la ville (nombre de zones) d’intersections de routes de zones (RESIDENTIAL,COMMERCIAL ou INDUSTRIAL) [Intersections] num_inter posX posY A B C D // numéro de l’intersection, position X et Y, états des intersection // C // | // D-- --B // | // A // -1 = intersection transparente // 0 = feu rouge // 1 = feu vert [Roads] inter1 inter2 // couple d’intersections formant la route [Zones] type posX posY // type de la zone, position X et Y // type : 1=RESIDENTIAL, 2=COMMERCIAL, 3=INDUSTRIAL C * [Globals] nbbuildings *.gcity // nombre de buildings [Buildings] type posX posY widthX widthY height // type du building, position X et Y du coin supérieur gauche du building, // largeur sur X, largeur sur Y, hauteur // type : 1=RESIDENTIAL, 2=COMMERCIAL, 3=INDUSTRIAL : ; #nomville.city, nomville.gcity$ 7* " + ' + 3 ! - . / " 0 1 2 . / , " 0 1 2 * [Globals] Small 7 7 6 7 6 [Intersections] 0 1 1 1 1 5 2 3 1 3 3 5 4 5 1 5 5 5 -1 -1 1 -1 -1 -1 -1 -1 0 0 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 0 0 -1 -1 [Roads] 0 1 2 3 4 5 0 2 2 4 1 3 3 5 [Zones] 1 2 1 4 1 2 1 4 1 2 1 4 2 2 3 3 4 4 3I ! : 2 : + ! + * ** , , =0K(% , * D() + CCamera D() AC)(( + CCameraFree D() A;B= + CCameraIso D() A ()B=+ CCamera3Person BLH0=G + CSkyBox ;%H + CCity 0 ;:!;-& + CBuilding M(N; :( + CVehicle %) CC; A:;&N% + CTrafficLight : , D() ? < 2 2 < 2 ' + + * ! ' ** 2 9 * * Draw(CFrustum *frustum) 2 + 2 2 ' * > 7 ' * 2 2 > ' ** ( * 2 CFrustum = B * O ' ** 2 # , 7= $ ' ** * 9 9 !(0 & CVector 2 + B ' ** * ; * * CObject * ' * 2 91 : 9 ! N * 2 2 2 9 7 ' 2 + & 0 I ' 2 ' + 0 7 ' : * ' ** 9 0 + 3J &: ! : m_vPosition # = + m_vUpVector 2 7 ' ' $ #* MoveCamera ' ' m_vView StrafeCamera$ ** + m_vPosition m_vUpVector 2 ' P 8 m_vView , C" C % ' 7 ' + 9 ' 2 # $ + ; 9 F < : = ( 9 CCameraSystem + Q 7 * 7 * , 9 ' * 2 2 ' ** F 3O ! < ( ' 5 6, * S + ( 4 ' 5 6, * 3 2 / # 1 ' = 9 CVehicle$ 2 m_zoneX m_zoneY GT HU FGV FHW m_direction # ' $ m_inter1 m_inter2 < m_stop m_speed 2 ' m_nextTurn * m_inInter X 2 ' ' 2 ' " 2 2 ' 2 ' 7 2 ( * < 2 2 # $ * * * B * 2 7 3R ! : ' 2 ' * , 7 * B < ' B * 2 * ' # 7 ' 2 7 ', 7 < * ' ' 7 * 7 $ +, % ! +, 7 + + 5 , % , +, +, +, + 5 ( +, ( +, + + 5 +, + 5 ,5 +, +, + 6 , 5 3 ! :' * 9 : glutMouseFunc() :' ** &: % 7 ' glutMotionFunc() ' Y * *2 glutKeyboardFunc() 7 &: % : * ' * * * < = &: 7 ' CBitmapGL ' F " ! glOrtho() glRasterPos2i(x,y) * ** 9 Q 7 * glutBitmapCharacter() ' ** ' 7 ' glDrawPixels() CTga 2 * ' %& S / 3 ! 2 .cpp ' wc Lignes 156 87 234 85 138 70 116 190 61 93 139 57 130 86 385 100 60 27 228 54 91 127 75 124 37 193 108 63 37 36 40 164 114 110 81 450 118 148 72 376 127 106 71 141 64 125 695 189 94 71 6743 ' * Mots 338 218 661 247 492 222 393 846 226 333 542 216 306 211 1276 249 110 61 1371 200 291 303 178 283 86 480 352 224 76 60 64 308 216 263 240 1333 362 531 186 1696 419 313 227 323 164 438 2290 588 236 196 21244 * Octets 3827 2193 7588 2302 3894 1921 3795 6332 2173 3223 4471 1988 2890 2026 10383 2238 1105 639 8473 1731 1906 2683 1801 3293 939 5230 3330 1782 549 434 492 3015 1801 2506 2301 14643 3478 4963 1599 12508 3822 2880 2079 3356 1367 3836 23027 5196 2321 1917 192246 * .h #J3$ Fichiers bitmapGL.cpp bitmapGL.h building.cpp building.h camera3person.cpp camera3person.h camera.cpp camerafree.cpp camerafree.h camera.h cameraiso.cpp cameraiso.h camerasystem.cpp camerasystem.h city.cpp city.h error.cpp error.h frustum.cpp frustum.h global.h graph.cpp graph.h initGLUT.cpp initGLUT.h intersection.cpp intersection.h makefile mouse.h node.cpp node.h object.cpp object.h road.cpp road.h simtraffic.cpp simtraffic.h skybox.cpp skybox.h tga.cpp tga.h timerGLUT.cpp timerGLUT.h trafficlight.cpp trafficlight.h vector.h vehicle.cpp vehicle.h zone.cpp zone.h total * ' * ! ! + ** "2 +' + * * " 9 9 66 0 + < ** 0 2 F +' 2 +' K " +7 2 2 ' * 2 = &: ' ** 2 ' ** 2 9 : 7= * &: 7 " < 9 * * " ( * " , + 2 * " 2 3 ( / ! "# )()' " * ' +) , ' 0 & 1 $ 23()3 32 . 7 !! 7 % simtraffic $# %.6 simtraffic(.exe) <nomville> 8 1 $ ' ' 1 .6 #7 nomville ! nomville.city nomville.gcity : -. # %4 % ! & %' 56 simtraffic.exe $/ 0. ! ! 9 ! ! 1 1 $ left right up z down bouton c $! maps6 1 h. ! ! ! ! q d s gauche 6 6 7 7 6 ; 6 6 1 ' % 5' % ' $< % &' % ' .6 + = = $ 1 % .6 !! - $ .6 9 p i 1 ' 1 $ ! ' 1 .6 1= t ! f m echap 6 ' 6 1 7 6 ! 7 ! 6 6 ! " # $ %& ' ( ) * +,(- . -/) (' ) 00 " &$1 " 3 * %3 ' / % * 9 . " 1 . 4 5 3 677 3 3 677222 ' 2 & 3 677222 % 3 677222 % : % % ; 2 " 4" % - :5 . % 8% / 2& . + + !! # & % " # $ $ $ ' ( $ ) $ $ & $ * ( ( + ' ' , , - # 0 / + $ .$ + $ $ - , +1.$ (% + + 2 3 4 $ 1 1 + ( , 7) ( ( 6 5 , , ( $ ( - 8 . / , 9 + $ ! ""$ * $% + ""$ ,- . /# . . & /# 011222. 011 . & + % ' &# % ( & ) .# .# . .# 0 .# 3 & 4 & 4/ 5 &# . 5 " # + .# ! " # !!# ' $ % $ ' ' #! #! !! # ' & # !!# $ % $ !" # $ % & # ! # $ % & # ' # $ % & " & # !!# $ % # ! # ! % & () !" # $ % & () *& # $ % & $ $ &