// tarcza ostrzegawcza ksztaltowa: (p6) symbol tarczy (np. ToA)

origin (p2) (p3) (p4)
rotate 0 (p5) 0
// model tarczy ostrzegawczej:
node 1500 0 (p1) model 0 0 0 0 PKP/TK1.t3d (p6) Lights 0 endmodel                 

node 800 150 none lines 80 80 80 100.0                                          //szara linia zeby byl maszt widoczny z daleka
0.0 0.0 0.0	0.0 2.5 0.0 
endline

// W1 awers
node -1 0 none triangle_strip material ambient: 150.0 150.0 150.0 diffuse: 220.0 220.0 220.0 specular: 154.0 154.0 154.0  endmaterial pkp/wskazniki2.BMP
0.4 1.6 0.51 	0.0 0.0 -1.0  0.00269513 0.756031 end
0.4 0.1 0.51 	0.0 0.0 -1.0  0.00269479 0.3411 end
-0.4 1.6 0.51 	0.0 0.0 -1.0  0.180528 0.75603 end
-0.4 0.1 0.51 	0.0 0.0 -1.0  0.182 0.3411 
endtri

// W1 rewers
node -1 0 none triangle_strip material ambient: 150.0 150.0 150.0 diffuse: 220.0 220.0 220.0 specular: 154.0 154.0 154.0  endmaterial pkp/wskazniki2.BMP
-0.4 1.6 0.52 	0 0 1.0  0.739943 0.748875 end
-0.4 0.1 0.52 	0 0 1.0  0.736632 0.34058 end
0.4 1.6 0.52 	0 0 1.0  0.99848 0.749202 end
0.4 0.1 0.52 	0 0 1.0  0.996336 0.341726 
endtri

rotate 0 0 0
endorigin

// ZDARZENA ZASADNICZE
event (p1)_od1 multiple 0.0 none (p1)_tarczadol (p1)_przeslona1dol (p1)_sem_distinfo_slow endevent
event (p1)_od2 multiple 0.0 none (p1)_tarczagora (p1)_przeslona1gora (p1)_sem_distinfo_fast endevent

event (p1)_sem_distinfo getvalues 1.0 (p1)_sem_distmem endevent

node -1 0 (p1)_sem_distmem memcell (p2) (p3) (p4) SetProximityVelocity 500.0 0.0 none endmemcell

//zdarzenia okreslajace przyblizona predkosc przy nastepnym semaforze
event (p1)_sem_distinfo_slow updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 0 endevent
event (p1)_sem_distinfo_fast updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 -1 endevent

// zmiana obrazu tarczy
event (p1)_tarczadol animation 1 (p1) rotate tarcza 0 0 0 100 endevent
event (p1)_przeslona1dol animation 1 (p1) rotate przeslona_01 0 0 0 100 endevent

event (p1)_tarczagora animation 1 (p1) rotate tarcza 83 0 0 100 endevent
event (p1)_przeslona1gora animation 1 (p1) rotate przeslona_01 0 53 0 100 endevent

//zapalanie/gaszenie oswietlenia:
event (p1)_dzienny lights 1.0 (p1) 0 endevent
event (p1)_nocny lights 1.0 (p1) 1 endevent


