Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2005, 12:55:48 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: setClassID implemented in all files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/satellite.cc

    r4320 r4597  
    11
    22
    3 /* 
     3/*
    44   orxonox - the future of 3D-vertical-scrollers
    55
     
    1313   ### File Specific:
    1414   main-programmer: Patrick Boenzli
    15    co-programmer: 
     15   co-programmer:
    1616*/
    1717
     
    3232{
    3333  this->setClassID(CL_SATELLITE, "Satellite");
     34
    3435  this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);
    3536  this->speed = speed;
     
    5253   \brief this method is called every frame
    5354   \param time: the time in seconds that has passed since the last tick
    54    
     55
    5556   Handle all stuff that should update with time inside this method (movement, animation, etc.)
    5657*/
    57 void Satellite::tick(float time) 
     58void Satellite::tick(float time)
    5859{
    5960  float w = this->speed * M_PI;
    6061
    61   Quaternion rotation(w * time, *this->axis); 
     62  Quaternion rotation(w * time, *this->axis);
    6263  Quaternion v = this->getRelDir();
    63  
     64
    6465  this->setRelDir(v * rotation);
    6566}
     
    6869/**
    6970   \brief the entity is drawn onto the screen with this function
    70    
     71
    7172   This is a central function of an entity: call it to let the entity painted to the screen. Just override this function with whatever you want to be drawn.
    7273*/
    73 void Satellite::draw() 
     74void Satellite::draw()
    7475{
    7576  glMatrixMode(GL_MODELVIEW);
    7677  glPushMatrix();
    7778  float matrix[4][4];
    78  
     79
    7980  /* translate */
    80   glTranslatef (this->getAbsCoor ().x, 
    81                 this->getAbsCoor ().y,
    82                 this->getAbsCoor ().z);
     81  glTranslatef (this->getAbsCoor ().x,
     82                this->getAbsCoor ().y,
     83                this->getAbsCoor ().z);
    8384  /* rotate */
    8485  this->getAbsDir ().matrix (matrix);
    8586  glMultMatrixf((float*)matrix);
    86  
     87
    8788  this->model->draw();
    8889  glPopMatrix();
Note: See TracChangeset for help on using the changeset viewer.