Changeset 3014 in orxonox.OLD for orxonox/branches
- Timestamp:
- Nov 27, 2004, 4:12:26 PM (20 years ago)
- Location:
- orxonox/branches/bezierTrack/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/bezierTrack/src/track.cc
r3013 r3014 63 63 64 64 65 Vector Track::getPos (float t) 66 { 67 return curve.calcPos (t); 68 } 69 65 70 /** 66 71 \brief calculate a camera Placement from a "look at"-Location … … 81 86 // float r = (lookat->dist)*PI / l; 82 87 // camplc->r = trace.r + (trace.a * ((lookat->dist-10.0) / l)) + Vector(0,0,5.0); 83 camplc->pos = curve.calcPos(t) + (curve.calcDir(t)* ((lookat->dist-10.0)/t)) + Vector(- 10,0,0);88 camplc->pos = curve.calcPos(t) + (curve.calcDir(t)* ((lookat->dist-10.0)/t)) + Vector(-5,0,5); 84 89 85 90 Vector w(0.0,0.0,0.0); -
orxonox/branches/bezierTrack/src/track.h
r3013 r3014 38 38 void addHotPoint (Vector hotPoint); 39 39 40 Vector getPos(float t); 41 40 42 virtual void post_enter (WorldEntity* entity); // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght) 41 43 virtual void post_leave (WorldEntity* entity); -
orxonox/branches/bezierTrack/src/world.cc
r3013 r3014 99 99 { 100 100 // create some path nodes 101 this->pathnodes = new Vector[6];102 101 103 102 this->tracklen = 6; … … 264 263 */ 265 264 //draw track 266 glBegin(GL_LINE S);265 glBegin(GL_LINE_STRIP); 267 266 glColor3f(0,1,1); 268 for( int i = 0; i < tracklen; i++) 269 { 270 glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z); 271 glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z); 267 for( float i = 0; i <= 1; i+=.01) 268 { 269 glVertex3f(track->getPos(i).x, track->getPos(i).y, track->getPos(i).z); 272 270 } 273 271 glEnd();
Note: See TracChangeset
for help on using the changeset viewer.