Changeset 4163 in orxonox.OLD for orxonox/branches
- Timestamp:
- May 11, 2005, 10:30:39 AM (20 years ago)
- Location:
- orxonox/branches/md2_loader/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4162 r4163 97 97 { 98 98 /* stretch the time with animation speed (and make seconds out of it) */ 99 float t = this->dtS / (1000.0f / kAnimationSpeed); 100 101 if ( unlikely(this->dtS >= (1000.0f / kAnimationSpeed)) ) 99 //float t = this->dtS / kAnimationSpeed; 100 101 if ( unlikely(this->localTime*1000.0 >= 1000.0/kAnimationSpeed) ) 102 { 102 103 pModel->currentFrame = nextFrame; 103 return t; 104 printf("changing frame\n"); 105 this->localTime = 0.0f; 106 } 107 printf("t = %f\n", this->localTime); 108 return (this->localTime/kAnimationSpeed); 104 109 } 105 110 … … 109 114 /* TEMP TEMP TEMP: save the current step length */ 110 115 this->dtS = dtS; 116 this->localTime += dtS; 111 117 } 112 118 -
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h
r4162 r4163 33 33 34 34 //! This stores the speed of the animation between each key frame - currently conflicting with the animation framework 35 #define kAnimationSpeed 5.0f35 #define kAnimationSpeed 12.0f 36 36 37 37 //! This holds the header information that is read in at the beginning of the file: id software definition … … 126 126 127 127 void tick(float dtS); 128 128 129 void animate(/*float time*/ t3DModel *pModel); 129 130 private: 130 void animate(/*float time*/ t3DModel *pModel);131 131 void processLightning(); 132 132 void interpolate(CVector3* vertlist); … … 135 135 136 136 float dtS; 137 float localTime; 137 138 }; 138 139 -
orxonox/branches/md2_loader/src/world_entities/test_entity.cc
r4159 r4163 45 45 46 46 47 void TestEntity::tick (float time) {} 47 void TestEntity::tick (float time) 48 { 49 this->md2Model->tick(time); 50 } 48 51 49 52 … … 70 73 /* TESTGING TESTING TESTING */ 71 74 this->material->select(); 72 this->md2Model->draw(this->model); 75 //this->md2Model->draw(this->model); 76 this->md2Model->animate(this->model); 73 77 74 78 glPopMatrix();
Note: See TracChangeset
for help on using the changeset viewer.