Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10147 in orxonox.OLD for trunk/src/world_entities/npcs


Ignore:
Timestamp:
Dec 25, 2006, 1:30:44 PM (18 years ago)
Author:
patrick
Message:

merged the mount_point branche back to trunk to use the new std::* based obj file importer

Location:
trunk/src/world_entities/npcs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/npc_test.cc

    r10114 r10147  
    3939  this->registerObject(this, NPC2::_objectList);
    4040
    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);
     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);
    4545
    4646
     
    8484 * Just override this function with whatever you want to be drawn.
    8585 */
    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// }
    111112
    112113
  • trunk/src/world_entities/npcs/npc_test.h

    r9869 r10147  
    2222
    2323  virtual void tick(float dt);
    24   virtual void draw() const;
     24//   virtual void draw() const;
    2525
    2626 private:
Note: See TracChangeset for help on using the changeset viewer.