- Timestamp:
- Feb 15, 2009, 12:48:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/src/orxonox/objects/worldentities/Planet.cc
r2662 r2667 74 74 if(activeCamera) 75 75 { 76 Realdistance = this->getPosition().distance( activeCamera->getWorldPosition() );76 float distance = this->getPosition().distance( activeCamera->getWorldPosition() ); 77 77 // COUT(2) << distance << std::endl; 78 RealplanetRadius = this->getScale();78 float planetRadius = this->getScale(); 79 79 80 RealnewScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);81 Real tempTest = newScale*(1+Real(this->atmosphereSize)/Real(this->imageSize));80 float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius); 81 float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize)); 82 82 newScale = tempTest; 83 83 … … 90 90 void Planet::init() 91 91 { 92 RealscaleFactor = this->getScale();92 float scaleFactor = this->getScale(); 93 93 94 94 this->distList.push_back(10.0*scaleFactor); … … 103 103 this->distList.push_back(55.0*scaleFactor); 104 104 105 RealreductionValue = 0.2;105 float reductionValue = 0.2; 106 106 107 107 this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
Note: See TracChangeset
for help on using the changeset viewer.