- Timestamp:
- May 10, 2007, 5:42:26 PM (18 years ago)
- Location:
- trunk/src/world_entities/environments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/environments/planet.cc
r10618 r10653 47 47 48 48 this->rotSpeedPlanet = 0.0; 49 this->rotVecPlanet = Vector(0,1,0); 49 50 this->rotSpeedCloud = 0.0; 50 51 this->bClouds = false; … … 85 86 LoadParam(root, "cloud-rotation", this, Planet, setCloudRotation) 86 87 .describe("Sets the cloud rotation speed"); 88 89 LoadParam(root, "planet-rotation-speed", this, Planet, setPlanetRotationSpeed) 90 .describe("Sets the planet rotation speed"); 91 92 LoadParam(root, "planet-rotation-axis", this, Planet, setPlanetRotationAxis) 93 .describe("Sets the planet rotation axis"); 87 94 } 88 95 … … 132 139 { 133 140 if( dt != 0.) 134 this->shiftDir( Quaternion( this->rotSpeedPlanet * dt, Vector(1,0,0)));141 this->shiftDir( Quaternion( this->rotSpeedPlanet * dt, this->rotVecPlanet)); 135 142 } 136 143 -
trunk/src/world_entities/environments/planet.h
r10618 r10653 31 31 void setCloudTexture(const std::string& textureName); 32 32 void setCloudRotation(float rotationSpeed); 33 void setPlanetRotationSpeed(float rotationSpeed){ this->rotSpeedPlanet = rotationSpeed;} 34 void setPlanetRotationAxis(float x, float y, float z){ this->rotVecPlanet = Vector(x,y,z);} 33 35 34 36 … … 48 50 float rotSpeedCloud; //! cloud rotation speed 49 51 float rotSpeedPlanet; //! planet rotation speed 52 Vector rotVecPlanet; //! planet rotation vector 50 53 float size; //!< Size of the Planet. This should match the frustum maximum range. 51 54 float textureSize; //!< this is the length of a texture (assumes a square texture)
Note: See TracChangeset
for help on using the changeset viewer.