Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10432 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jan 28, 2007, 2:25:09 AM (18 years ago)
Author:
patrick
Message:

more on planets. no atmo

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

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

    r10424 r10432  
    2929#include "vertex_array_model.h"
    3030#include "primitive_model.h"
     31#include "effects/billboard.h"
    3132
    3233#include "debug.h"
     
    7879      .describe("Sets the materialPlanet on the Planet. The string must be the path relative to the data-dir, and without a trailing .jpg");
    7980
     81    LoadParam(root, "size", this, Planet, setSize)
     82      .describe("Sets the Size of the Planet (normally this should be 90% of the maximal viewing Distance).");
     83
    8084  LoadParam(root, "cloud-texture", this, Planet, setCloudTexture)
    8185      .describe("Sets the cloud texture of the planet");
     
    8387  LoadParam(root, "cloud-rotation", this, Planet, setCloudRotation)
    8488      .describe("Sets the cloud rotation speed");
    85 
    86   LoadParam(root, "size", this, Planet, setSize)
    87       .describe("Sets the Size of the Planet (normally this should be 90% of the maximal viewing Distance).");
    8889}
    8990
     
    105106void Planet::setCloudTexture(const std::string& textureName)
    106107{
    107   this->materialCloud.setDiffuseMap(textureName);
     108//   this->materialCloud.setDiffuseMap(textureName);
     109//   this->halo = new Billboard();
     110//   this->halo->setTexture( textureName);
     111//   this->halo->setSize(this->size + 5, this->size + 5);
     112//   this->halo->setParent( this);
    108113  this->bClouds = true;
    109114}
     
    142147  WorldEntity::draw();
    143148
    144   if( this->bClouds)
    145   {
    146     glDisable(GL_LIGHTING);
    147     this->materialCloud.select();
    148     WorldEntity::draw(this->cloudModel);
    149     glEnable(GL_LIGHTING);
    150   }
     149//   if( this->bClouds)
     150//   {
     151//     glDisable(GL_LIGHTING);
     152//     this->materialCloud.select();
     153//     WorldEntity::draw(this->cloudModel);
     154//     glEnable(GL_LIGHTING);
     155//   }
    151156}
    152157
  • trunk/src/world_entities/planet.h

    r10392 r10432  
    1212/* FORWARD DECLARATION */
    1313class Texture;
     14class Billboard;
    1415
    1516//! A Class to handle a Planet
     
    4344
    4445  Model*          cloudModel;      //!< the model for the cloud
     46  Billboard*      halo;            //!< halo around the planet
    4547
    4648  bool            bClouds;         //!< true if there are clouds defined
Note: See TracChangeset for help on using the changeset viewer.