Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3125 for code


Ignore:
Timestamp:
Jun 9, 2009, 2:48:32 PM (15 years ago)
Author:
rgrieder
Message:

Renamed stupid omni_cast to multi_cast. It still eats about anything ;)

Location:
code/branches/pch/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/core/input/InputManager.cc

    r3084 r3125  
    367367        for (unsigned int i = 0; i < configValueVectorSize; ++i)
    368368        {
    369             list[i] = omni_cast<int>(ConfigFileManager::getInstance().getValue(
    370                 ConfigFileType::JoyStickCalibration, sectionName, valueName, i, omni_cast<std::string>(defaultValue), false));
     369            list[i] = multi_cast<int>(ConfigFileManager::getInstance().getValue(
     370                ConfigFileType::JoyStickCalibration, sectionName, valueName, i, multi_cast<std::string>(defaultValue), false));
    371371        }
    372372
     
    403403            // Generate some sort of execution unique id per joy stick
    404404            std::string id = "JoyStick_";
    405             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
    406             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
    407             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
    408             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
    409             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
     405            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
     406            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
     407            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
     408            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
     409            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
    410410            id += joySticks_[iJoyStick]->vendor();
    411411            for (unsigned int i = 0; i < iJoyStick; ++i)
     
    414414                {
    415415                    // Two joysticks are probably equal --> add the index as well
    416                     id += "_" + omni_cast<std::string>(iJoyStick);
     416                    id += "_" + multi_cast<std::string>(iJoyStick);
    417417                }
    418418            }
     
    497497                    joyStickMinValues_[iJoyStick][i] = -32768;
    498498                ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
    499                     this->joyStickIDs_[iJoyStick], "MinValue", i, omni_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
     499                    this->joyStickIDs_[iJoyStick], "MinValue", i, multi_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
    500500
    501501                // Maximum values
     
    503503                    joyStickMaxValues_[iJoyStick][i] = 32767;
    504504                ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
    505                     this->joyStickIDs_[iJoyStick], "MaxValue", i, omni_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
     505                    this->joyStickIDs_[iJoyStick], "MaxValue", i, multi_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
    506506
    507507                // Middle values
    508508                ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
    509                     this->joyStickIDs_[iJoyStick], "MiddleValue", i, omni_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
     509                    this->joyStickIDs_[iJoyStick], "MiddleValue", i, multi_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
    510510            }
    511511        }
  • code/branches/pch/src/orxonox/objects/Scene.cc

    r3110 r3125  
    139139        {
    140140            CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
    141                      << omni_cast<std::string>(range) << std::endl;
     141                     << multi_cast<std::string>(range) << std::endl;
    142142        }
    143143        if (this->hasPhysics())
     
    158158        {
    159159            CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
    160                      << omni_cast<std::string>(range) << std::endl;
     160                     << multi_cast<std::string>(range) << std::endl;
    161161        }
    162162        if (this->hasPhysics())
     
    176176        this->gravity_ = gravity;
    177177        if (this->hasPhysics())
    178             this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
     178            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
    179179    }
    180180
     
    187187            //       It would require further investigation to properly dertermine the right choices.
    188188            this->broadphase_      = new bt32BitAxisSweep3(
    189                 omni_cast<btVector3>(this->negativeWorldRange_), omni_cast<btVector3>(this->positiveWorldRange_));
     189                multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_));
    190190            this->collisionConfig_ = new btDefaultCollisionConfiguration();
    191191            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
     
    193193
    194194            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
    195             this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
     195            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
    196196
    197197            // also set the collision callback variable.
  • code/branches/pch/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc

    r3110 r3125  
    7272    btCollisionShape* BoxCollisionShape::createNewShape() const
    7373    {
    74         return new btBoxShape(omni_cast<btVector3>(this->halfExtents_));
     74        return new btBoxShape(multi_cast<btVector3>(this->halfExtents_));
    7575    }
    7676}
  • code/branches/pch/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc

    r3110 r3125  
    8989        {
    9090            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
    91             btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
     91            btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
    9292            this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
    9393
     
    134134        {
    135135            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
    136             btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
     136            btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
    137137            this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
    138138            it->second = shape->getCollisionShape();
  • code/branches/pch/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc

    r3110 r3125  
    7272    btCollisionShape* PlaneCollisionShape::createNewShape() const
    7373    {
    74         return new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_);
     74        return new btStaticPlaneShape(multi_cast<btVector3>(this->normal_), this->offset_);
    7575    }
    7676}
  • code/branches/pch/src/orxonox/overlays/stats/Scoreboard.cc

    r3110 r3125  
    101101        for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
    102102        {
    103             this->lines_[index]->setPlayerName(omni_cast<std::string>(it->first->getName()));
    104             this->lines_[index]->setScore(omni_cast<std::string>(it->second.frags_));
    105             this->lines_[index]->setDeaths(omni_cast<std::string>(it->second.killed_));
     103            this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
     104            this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
     105            this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
    106106            index++;
    107107        }
  • code/branches/pch/src/util/Convert.h

    r2710 r3125  
    370370    // That means you can call it exactly like static_cast<ToType>(fromTypeValue).
    371371    template<class ToType, class FromType>
    372     inline ToType omni_cast(const FromType& input)
     372    inline ToType multi_cast(const FromType& input)
    373373    {
    374374        ToType output;
Note: See TracChangeset for help on using the changeset viewer.