Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6912 in orxonox.OLD for trunk/src/lib/graphics


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

orxonox/trunk: tried to fix the planet

File:
1 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    }
Note: See TracChangeset for help on using the changeset viewer.