Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10392 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jan 26, 2007, 7:33:33 PM (18 years ago)
Author:
patrick
Message:

better cloud options, clouds are optional now

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/planet.cc

    r10391 r10392  
    4747  this->rotSpeedPlanet = 0.0;
    4848  this->rotSpeedCloud = 0.0;
     49  this->bClouds = false;
    4950
    5051  //this->materialPlanet->setIllum(20);
     
    5758  this->setModel(model);
    5859
    59   this->cloudModel = new PrimitiveModel(PRIM_SPHERE, this->size + 10, 50);
     60  this->cloudModel = new PrimitiveModel(PRIM_SPHERE, this->size + 2, 50);
    6061}
    6162
     
    105106{
    106107  this->materialCloud.setDiffuseMap(textureName);
     108  this->bClouds = true;
    107109}
    108110
     
    140142  WorldEntity::draw();
    141143
    142   this->materialCloud.select();
    143   WorldEntity::draw(this->cloudModel);
    144 
     144  if( this->bClouds)
     145  {
     146    glDisable(GL_LIGHTING);
     147    this->materialCloud.select();
     148    WorldEntity::draw(this->cloudModel);
     149    glEnable(GL_LIGHTING);
     150  }
    145151}
    146152
  • trunk/src/world_entities/planet.h

    r10391 r10392  
    4444  Model*          cloudModel;      //!< the model for the cloud
    4545
     46  bool            bClouds;         //!< true if there are clouds defined
    4647  float           rotSpeedCloud;   //! cloud rotation speed
    4748  float           rotSpeedPlanet;  //! planet rotation speed
Note: See TracChangeset for help on using the changeset viewer.