Changeset 10391 in orxonox.OLD for trunk/src/world_entities/planet.cc
- Timestamp:
- Jan 26, 2007, 7:12:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/planet.cc
r10387 r10391 45 45 this->toList(OM_GROUP_01); 46 46 47 this->rotSpeedPlanet = 0.0; 48 this->rotSpeedCloud = 0.0; 49 47 50 //this->materialPlanet->setIllum(20); 48 51 //this->materialPlanet->setAmbient(0.1, 0.1, 0.1); … … 54 57 this->setModel(model); 55 58 56 57 59 this->cloudModel = new PrimitiveModel(PRIM_SPHERE, this->size + 10, 50); 58 60 } 59 61 … … 77 79 LoadParam(root, "cloud-texture", this, Planet, setCloudTexture) 78 80 .describe("Sets the cloud texture of the planet"); 81 82 LoadParam(root, "cloud-rotation", this, Planet, setCloudRotation) 83 .describe("Sets the cloud rotation speed"); 79 84 80 85 LoadParam(root, "size", this, Planet, setSize) … … 103 108 104 109 110 void Planet::setCloudRotation(float rotationSpeed) 111 { 112 this->rotSpeedCloud = rotationSpeed; 113 } 114 105 115 /** 106 116 * @param size The new size of the Planet … … 114 124 115 125 126 void Planet::tick( float dt) 127 { 128 if( dt != 0.) 129 this->shiftDir( Quaternion( this->rotSpeedPlanet * dt, Vector(1,0,0))); 130 } 116 131 132 133 /** 134 * draws the planet 135 */ 117 136 void Planet::draw() const 118 137 { 138 // draw the clouds 119 139 this->materialPlanet.select(); 140 WorldEntity::draw(); 120 141 121 WorldEntity::draw(); 142 this->materialCloud.select(); 143 WorldEntity::draw(this->cloudModel); 144 122 145 } 123 146
Note: See TracChangeset
for help on using the changeset viewer.