Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2009, 10:00:15 AM (16 years ago)
Author:
rgrieder
Message:

Replaced <OgrePrerequisites.h> with "util/OgreForwardRefs.h": I haven't yet realised that OgrePrerequisites.h includes about every single std header by including the OgreMemoryManager.h file.
And while at it, I took care of some type conversions (partially revealed by the missing OgrePrerequisites.h that disabled warnings)

Location:
code/branches/pch/src/orxonox/objects/worldentities
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r3186 r3192  
    7979            this->time_ += dt;
    8080            if (this->bQuadratic_)
    81                 this->setScale(this->amplitude_ * square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
     81                this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
    8282            else
    83                 this->setScale(this->amplitude_ * sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_));
     83                this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
    8484        }
    8585    }
  • code/branches/pch/src/orxonox/objects/worldentities/Camera.h

    r3186 r3192  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgrePrerequisites.h>
     34#include "util/OgreForwardRefs.h"
    3535#include "interfaces/Tickable.h"
    3636#include "objects/worldentities/StaticEntity.h"
  • code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r3188 r3192  
    151151            Vector3 change(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1));
    152152            change.normalise();
    153             change *= rnd(0.4, 0.8);
     153            change *= rnd(0.4f, 0.8f);
    154154            Vector3 velocity = this->getVelocity();
    155155            velocity.normalise();
    156156            velocity += change;
    157157            velocity.normalise();
    158             velocity *= length * rnd(0.8, 1.0);
     158            velocity *= length * rnd(0.8f, 1.0f);
    159159
    160160            this->setVelocity(velocity);
  • code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc

    r3186 r3192  
    9292                this->angularVelocity_.z += angularAcceleration_.z * dt;
    9393                // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method.
    94                 float mult = dt * 0.5;
     94                float mult = dt * 0.5f;
    9595                // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions!
    9696                Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult);
  • code/branches/pch/src/orxonox/objects/worldentities/Planet.cc

    r3186 r3192  
    9191        float scaleFactor = this->getScale();
    9292
    93         this->distList.push_back(10.0*scaleFactor);
    94         this->distList.push_back(19.0*scaleFactor);
    95         this->distList.push_back(27.0*scaleFactor);
    96         this->distList.push_back(34.0*scaleFactor);
    97         this->distList.push_back(40.0*scaleFactor);
    98         this->distList.push_back(45.0*scaleFactor);
    99         this->distList.push_back(49.0*scaleFactor);
    100         this->distList.push_back(52.0*scaleFactor);
    101         this->distList.push_back(54.0*scaleFactor);
    102         this->distList.push_back(55.0*scaleFactor);
     93        this->distList.push_back(10.0f*scaleFactor);
     94        this->distList.push_back(19.0f*scaleFactor);
     95        this->distList.push_back(27.0f*scaleFactor);
     96        this->distList.push_back(34.0f*scaleFactor);
     97        this->distList.push_back(40.0f*scaleFactor);
     98        this->distList.push_back(45.0f*scaleFactor);
     99        this->distList.push_back(49.0f*scaleFactor);
     100        this->distList.push_back(52.0f*scaleFactor);
     101        this->distList.push_back(54.0f*scaleFactor);
     102        this->distList.push_back(55.0f*scaleFactor);
    103103
    104         float reductionValue = 0.2;
     104        float reductionValue = 0.2f;
    105105
    106106        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
  • code/branches/pch/src/orxonox/objects/worldentities/PongBall.cc

    r3186 r3192  
    5050        this->batID_[0] = OBJECTID_UNKNOWN;
    5151        this->batID_[1] = OBJECTID_UNKNOWN;
    52         this->relMercyOffset_ = 0.05;
     52        this->relMercyOffset_ = 0.05f;
    5353
    5454        this->registerVariables();
     
    103103                    if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
    104104                    {
    105                         distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     105                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    106106                        if (fabs(distance) <= 1)
    107107                        {
     
    123123                    if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
    124124                    {
    125                         distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     125                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    126126                        if (fabs(distance) <= 1)
    127127                        {
     
    173173              if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
    174174              {
    175                 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     175                distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    176176                if (fabs(distance) <= 1)
    177177                {
     
    184184              if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
    185185              {
    186                 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     186                distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    187187                if (fabs(distance) <= 1)
    188188                {
  • code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h

    r3188 r3192  
    3434
    3535#ifdef ORXONOX_RELEASE
    36 #include <OgreSceneNode.h>
    37 #else
    38 #include <OgrePrerequisites.h>
     36#  include <OgreSceneNode.h>
    3937#endif
    4038#include <LinearMath/btMotionState.h>
    4139
    4240#include "util/Math.h"
     41#include "util/OgreForwardRefs.h"
    4342#include "core/BaseObject.h"
    4443#include "network/synchronisable/Synchronisable.h"
  • code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r3188 r3192  
    5959        {
    6060            this->greetingFlare_ = new BillboardSet();
    61             this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
     61            this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0f, 1.0f, 0.8f), Vector3(0, 20, 0), 1);
    6262            if (this->greetingFlare_->getBillboardSet())
    6363                this->attachOgreObject(this->greetingFlare_->getBillboardSet());
Note: See TracChangeset for help on using the changeset viewer.