- glVertex3f(ep.pos.x-s*0.025, ep.pos.y+c*0.025, 0);
- glVertex3f(ep.pos.x+s*0.025, ep.pos.y-c*0.025, 0);
- glVertex3f(ep.pos.x+s*0.025, ep.pos.y-c*0.025, 0.02);
- glVertex3f(ep.pos.x-s*0.025, ep.pos.y+c*0.025, 0.02);
+ glVertex3f(ep.pos.x-s*0.025, ep.pos.y+c*0.025, z);
+ glVertex3f(ep.pos.x+s*0.025, ep.pos.y-c*0.025, z);
+ glVertex3f(ep.pos.x+s*0.025, ep.pos.y-c*0.025, z+0.02);
+ glVertex3f(ep.pos.x-s*0.025, ep.pos.y+c*0.025, z+0.02);
+ glEnd();
+ }
+
+ if(abs(track.get_slope())>1e-4)
+ {
+ Point p;
+ if(track.get_slope()>0)
+ {
+ p = endpoints[1].pos;
+ p.z += track.get_slope();
+ }
+ else
+ p = endpoints[0].pos;
+ glBegin(GL_TRIANGLE_STRIP);
+ for(unsigned i=0; i<=16; ++i)
+ {
+ float c = cos(i*M_PI/8);
+ float s = sin(i*M_PI/8);
+ glNormal3f(c, s, 0);
+ glVertex3f(p.x+c*0.01, p.y+s*0.01, p.z);
+ glVertex3f(p.x+c*0.01, p.y+s*0.01, -track.get_position().z);
+ }