Changeset 10147 in orxonox.OLD for trunk/src/world_entities/npcs
- Timestamp:
- Dec 25, 2006, 1:30:44 PM (18 years ago)
- Location:
- trunk/src/world_entities/npcs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/npc_test.cc
r10114 r10147 39 39 this->registerObject(this, NPC2::_objectList); 40 40 41 if ((float)rand()/RAND_MAX > .5f)42 this->loadModel("models/ships/bolido.obj", 6);43 else44 this->loadModel("models/ships/gobblin.obj", 6);41 // if ((float)rand()/RAND_MAX > .5f) 42 // this->loadModel("models/ships/bolido.obj", 6); 43 // else 44 // this->loadModel("models/ships/gobblin.obj", 6); 45 45 46 46 … … 84 84 * Just override this function with whatever you want to be drawn. 85 85 */ 86 void NPC2::draw() const 87 { 88 glMatrixMode(GL_MODELVIEW); 89 glPushMatrix(); 90 float matrix[4][4]; 91 92 /* translate */ 93 glTranslatef (this->getAbsCoor ().x, 94 this->getAbsCoor ().y, 95 this->getAbsCoor ().z); 96 /* rotate */ 97 this->getAbsDir ().matrix (matrix); 98 glMultMatrixf((float*)matrix); 99 100 // if (this->shader != NULL && this->shader != Shader::getActiveShader()) 101 // shader->activateShader(); 102 103 this->getModel()->draw(); 104 // shader->deactivateShader(); 105 106 107 /* if (this->model) 108 this->model->draw();*/ 109 glPopMatrix(); 110 } 86 // void NPC2::draw() const 87 // { 88 // glMatrixMode(GL_MODELVIEW); 89 // glPushMatrix(); 90 // float matrix[4][4]; 91 // 92 // /* translate */ 93 // glTranslatef (this->getAbsCoor ().x, 94 // this->getAbsCoor ().y, 95 // this->getAbsCoor ().z); 96 // /* rotate */ 97 // this->getAbsDir ().matrix (matrix); 98 // glMultMatrixf((float*)matrix); 99 // 100 // // if (this->shader != NULL && this->shader != Shader::getActiveShader()) 101 // // shader->activateShader(); 102 // 103 // if( this->getModel()) 104 // this->getModel()->draw(); 105 // // shader->deactivateShader(); 106 // 107 // 108 // /* if (this->model) 109 // this->model->draw();*/ 110 // glPopMatrix(); 111 // } 111 112 112 113 -
trunk/src/world_entities/npcs/npc_test.h
r9869 r10147 22 22 23 23 virtual void tick(float dt); 24 virtual void draw() const;24 // virtual void draw() const; 25 25 26 26 private:
Note: See TracChangeset
for help on using the changeset viewer.