Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 15, 2009, 12:48:03 AM (16 years ago)
Author:
rgrieder
Message:

Windows version compiling and running so far (msvc and mingw).

Location:
code/branches/buildsystem3/src/orxonox/objects/worldentities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem3/src/orxonox/objects/worldentities/Planet.cc

    r2662 r2667  
    7474        if(activeCamera)
    7575        {
    76             Real distance = this->getPosition().distance( activeCamera->getWorldPosition() );
     76            float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
    7777            //             COUT(2) << distance << std::endl;
    78             Real planetRadius = this->getScale();
     78            float planetRadius = this->getScale();
    7979
    80             Real newScale = 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));
    8282            newScale = tempTest;
    8383
     
    9090    void Planet::init()
    9191    {
    92         Real scaleFactor = this->getScale();
     92        float scaleFactor = this->getScale();
    9393
    9494        this->distList.push_back(10.0*scaleFactor);
     
    103103        this->distList.push_back(55.0*scaleFactor);
    104104
    105         Real reductionValue = 0.2;
     105        float reductionValue = 0.2;
    106106
    107107        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
  • code/branches/buildsystem3/src/orxonox/objects/worldentities/Planet.h

    r2662 r2667  
    7171            }
    7272           
    73             inline void setAtmosphereSize(Real size){
     73            inline void setAtmosphereSize(float size){
    7474                this->atmosphereSize = size;
    7575            }
    7676           
    77             inline Real getAtmosphereSize(){
     77            inline float getAtmosphereSize(){
    7878                return this->atmosphereSize;
    7979            }
     
    8787            }
    8888           
    89             inline void setImageSize(Real size){
     89            inline void setImageSize(float size){
    9090                this->imageSize = size;
    9191            }
    9292           
    93             inline Real getImageSize(){
     93            inline float getImageSize(){
    9494                return this->imageSize;
    9595            }
     
    106106            std::string atmosphere_;
    107107            Mesh mesh_;
    108             Real atmosphereSize;
    109             Real imageSize;
     108            float atmosphereSize;
     109            float imageSize;
    110110            Ogre::Mesh::LodDistanceList distList;
    111111            BillboardSet billboard_;
Note: See TracChangeset for help on using the changeset viewer.