Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5994 in orxonox.OLD for trunk/src/world_entities/weapons


Ignore:
Timestamp:
Dec 9, 2005, 10:43:31 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: much cleaner Model Loading unloading, model is now private to WorldEntity (not protected)

Location:
trunk/src/world_entities/weapons
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r5930 r5994  
    169169  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    170170
    171   this->model->draw();
     171  this->getModel()->draw();
    172172  glPopMatrix();
    173173}
  • trunk/src/world_entities/weapons/bomb.cc

    r5828 r5994  
    147147  if (this->lifeCycle < .9)
    148148  {
    149     if (model)
    150       model->draw();
     149    if (this->getModel() != NULL)
     150      this->getModel()->draw();
    151151  }
    152152  else
  • trunk/src/world_entities/weapons/cannon.cc

    r5930 r5994  
    194194  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    195195
    196   this->model->draw();
     196  this->getModel()->draw();
    197197  glPopMatrix();
    198198
  • trunk/src/world_entities/weapons/ground_turret.cc

    r5982 r5994  
    128128  glMultMatrixf((float*)matrix);
    129129
    130   if (this->model)
    131     this->model->draw();
     130  if (this->getModel())
     131    this->getModel()->draw();
    132132
    133133  glPopMatrix();
  • trunk/src/world_entities/weapons/guided_missile.cc

    r5915 r5994  
    202202  glMultMatrixf((float*)matrix);
    203203  glScalef(2.0, 2.0, 2.0);
    204   this->model->draw();
     204  this->getModel()->draw();
    205205
    206206  glPopMatrix();
  • trunk/src/world_entities/weapons/laser.cc

    r5779 r5994  
    156156  glMultMatrixf((float*)matrix);
    157157  glScalef(2.0, 2.0, 2.0);
    158   this->model->draw();
     158  this->getModel()->draw();
    159159  glPopAttrib();
    160160  glPopMatrix();
  • trunk/src/world_entities/weapons/projectile.cc

    r5769 r5994  
    137137{}
    138138
    139 
    140 void Projectile::draw () const
    141 {
    142   glMatrixMode(GL_MODELVIEW);
    143   glPushMatrix();
    144 
    145   float matrix[4][4];
    146   glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    147   this->getAbsDir().matrix (matrix);
    148   glMultMatrixf((float*)matrix);
    149   this->model->draw();
    150 
    151   glPopMatrix();
    152 }
    153 
  • trunk/src/world_entities/weapons/projectile.h

    r5766 r5994  
    4141
    4242    virtual void tick (float time);
    43     virtual void draw () const;
    4443
    4544  protected:
  • trunk/src/world_entities/weapons/rocket.cc

    r5819 r5994  
    187187  glMultMatrixf((float*)matrix);
    188188  glScalef(2.0, 2.0, 2.0);
    189   this->model->draw();
     189  this->getModel()->draw();
    190190
    191191  glPopMatrix();
  • trunk/src/world_entities/weapons/test_bullet.cc

    r5779 r5994  
    181181  glMultMatrixf((float*)matrix);
    182182  glScalef(2.0, 2.0, 2.0);
    183   this->model->draw();
     183  this->getModel()->draw();
    184184
    185185  glPopMatrix();
  • trunk/src/world_entities/weapons/test_gun.cc

    r5930 r5994  
    219219  if( this->leftRight == W_RIGHT)
    220220    glScalef(1.0, 1.0, -1.0);
    221   this->model->draw(1);
     221  this->getModel()->draw(1);
    222222  glPopMatrix();
    223223
     
    230230  tmpRot = this->objectComponent1->getAbsDir().getSpacialAxis();
    231231  glRotatef (this->objectComponent1->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    232   this->model->draw(0);
     232  this->getModel()->draw(0);
    233233  glPopMatrix();
    234234}
  • trunk/src/world_entities/weapons/turret.cc

    r5930 r5994  
    147147void Turret::destroy ()
    148148{}
    149 
    150 /**
    151  * draws the Turret
    152 */
    153 void Turret::draw () const
    154 {
    155   if (this->model != NULL)
    156   {
    157     /* draw gun body */
    158     glMatrixMode(GL_MODELVIEW);
    159     glPushMatrix();
    160     glTranslatef (this->getAbsCoor ().x,
    161                   this->getAbsCoor ().y,
    162                   this->getAbsCoor ().z);
    163     Vector tmpRot = this->getAbsDir().getSpacialAxis();
    164     glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    165 
    166     this->model->draw();
    167     glPopMatrix();
    168   }
    169 }
  • trunk/src/world_entities/weapons/turret.h

    r5750 r5994  
    2626    virtual void destroy();
    2727
    28     virtual void draw() const;
    2928
    3029  private:
Note: See TracChangeset for help on using the changeset viewer.