Changeset 10410 in orxonox.OLD for trunk/src/util/track
- Timestamp:
- Jan 27, 2007, 7:30:45 PM (18 years ago)
- Location:
- trunk/src/util/track
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/track/track.cc
r10397 r10410 133 133 { 134 134 this->duration = this->duration/speed; 135 135 136 136 } 137 137 … … 218 218 this->localTime = 0; 219 219 } 220 220 221 221 // if (this->localTime > this->currentTrackElem->endTime 222 222 // && this->currentTrackElem->children) … … 238 238 Vector tmp = this->calcPos(); 239 239 //Quaternion quat = Quaternion(this->calcDir(), Vector(this->curve->calcAcc(this->localTime/this->duration).x,1,this->curve->calcAcc(this->localTime/this->duration).z)); 240 240 241 241 242 242 Vector v(0.0, 1.0, 0.0); … … 267 267 eventually this will all be packed into a gl-list. 268 268 */ 269 /*void Track::drawGraph(float dt) const 270 { 269 void Track::drawGraph(float dt) const 270 { 271 glMatrixMode(GL_MODELVIEW); 272 glPushMatrix(); 273 274 glPushAttrib(GL_ENABLE_BIT); 275 276 glDisable(GL_LIGHTING); 277 glDisable(GL_TEXTURE_2D); 278 glDisable(GL_BLEND); 279 glLineWidth(2.0); 280 281 282 283 PNode* node = PNode::getNullParent(); 284 glTranslatef (node->getAbsCoor ().x, 285 node->getAbsCoor ().y, 286 node->getAbsCoor ().z); 287 Vector tmpRot = node->getAbsDir().getSpacialAxis(); 288 glRotatef (node->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 289 271 290 glBegin(GL_LINE_STRIP); 291 glColor3f(1.0, 1.0, 0.6); 292 272 293 for(float f = 0.0; f < 1.0; f+=dt) 273 294 { 274 // PRINTF(4)("drawing",this->calcPos().x, this->calcPos().y, this->calcPos().z);295 //PRINTF(0)("drawing",this->calcPos().x, this->calcPos().y, this->calcPos().z); 275 296 Vector tmpVector = this->curve->calcPos(f); 276 297 glVertex3f(tmpVector.x, tmpVector.y, tmpVector.z); 277 298 } 278 299 glEnd(); 279 }*/ 300 301 glPopAttrib(); 302 303 glPopMatrix(); 304 } -
trunk/src/util/track/track.h
r10385 r10410 34 34 35 35 PNode* getTrackNode(); 36 37 // void drawGraph(float dt) const;38 36 37 void drawGraph(float dt = 0.01) const; 38 39 39 //float startingTime; //!< The time at which this Track begins. 40 40 float duration; //!< The time used to cross this Track (curve).
Note: See TracChangeset
for help on using the changeset viewer.