Changeset 10387 in orxonox.OLD for trunk/src/world_entities/planet.cc
- Timestamp:
- Jan 26, 2007, 6:22:33 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/planet.cc
r10114 r10387 45 45 this->toList(OM_GROUP_01); 46 46 47 //this->material->setIllum(20); 48 //this->material->setAmbient(0.1, 0.1, 0.1); 47 //this->materialPlanet->setIllum(20); 48 //this->materialPlanet->setAmbient(0.1, 0.1, 0.1); 49 50 if( root != NULL) 51 this->loadParams(root); 52 53 PrimitiveModel* model = new PrimitiveModel(PRIM_SPHERE, this->size, 50); 54 this->setModel(model); 49 55 50 56 51 57 52 //st float radius, const unsigned int loops, const unsigned int segmentsPerLoop53 54 this->loadParams(root);55 56 // VertexArrayModel* model = new VertexArrayModel();57 // model->spiralSphere(this->size, 10, 10);58 // this->setModel(model);59 // model->debug();60 //61 PrimitiveModel* model = new PrimitiveModel(PRIM_SPHERE, this->size, 50);62 this->setModel(model);63 58 } 64 59 … … 78 73 79 74 LoadParam(root, "texture", this, Planet, setTexture) 80 .describe("Sets the material on the Planet. The string must be the path relative to the data-dir, and without a trailing .jpg"); 75 .describe("Sets the materialPlanet on the Planet. The string must be the path relative to the data-dir, and without a trailing .jpg"); 76 77 LoadParam(root, "cloud-texture", this, Planet, setCloudTexture) 78 .describe("Sets the cloud texture of the planet"); 81 79 82 80 LoadParam(root, "size", this, Planet, setSize) … … 91 89 void Planet::setTexture(const std::string& textureName) 92 90 { 93 this->material.setDiffuseMap(textureName); 91 this->materialPlanet.setDiffuseMap(textureName); 92 } 93 94 95 /** 96 * Defines which textures should be loaded onto the Planet. 97 * @param textureName the top texture. 98 */ 99 void Planet::setCloudTexture(const std::string& textureName) 100 { 101 this->materialCloud.setDiffuseMap(textureName); 94 102 } 95 103 … … 109 117 void Planet::draw() const 110 118 { 111 this->material .select();119 this->materialPlanet.select(); 112 120 113 121 WorldEntity::draw();
Note: See TracChangeset
for help on using the changeset viewer.