Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6912 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jan 31, 2006, 8:24:49 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: tried to fix the planet

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/primitive_model.cc

    r5437 r6912  
    7373  if (detail <= 0)
    7474    detail = 1;
    75   size /= 2;
     75  size /= 2.0;
    7676  //  detail = 2; // make it even
    7777  float df = (float)detail;
     
    8080  for (float i = 0; i < df *2.0; i+=1.0)
    8181    {
    82       float vi = i/df *PI;
    83       for (float j = -df / 2.0 +1.0; j < df / 2.0; j+=1.0 *df/(df+1.0))
     82      float vi = i/df * PI;
     83      for (float j = -df / 2.0 +1.0; j <= df / 2.0; j+=1.0 *df/(df+1.0))
    8484        {
    8585          float vj = j/df *PI;
     
    9292                          size * sin(vi) * cos(vj));
    9393
    94           this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5);
     94          this->addVertexTexture( i / (df *2.0),
     95                                 (j-1.0)/(df)+.5);
    9596        }
    9697    }
  • trunk/src/world_entities/planet.cc

    r6780 r6912  
    112112void Planet::draw() const
    113113{
    114 
    115 
    116114  glMatrixMode(GL_MODELVIEW);
    117115  glPushMatrix();
     
    123121                this->getAbsCoor ().y,
    124122                this->getAbsCoor ().z);
    125 
     123  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     124  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    126125
    127126  this->material->select();
Note: See TracChangeset for help on using the changeset viewer.