Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 1, 2009, 1:24:30 PM (15 years ago)
Author:
rgrieder
Message:
  • Removed superfluous convertToString and convertFromString (replaced them with multi_cast)
  • Replaced all getConvertedValue with multi_cast since it doesn't involve a potential implicit cast of the argument (template type deduction always leads to the right type)
  • Using NilValue<T>() instead of zeroise<T>() for better performance (detail, but just caught my eye)
Location:
code/branches/core4/src/orxonox/tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/tools/BillboardSet.cc

    r3250 r3265  
    7474            if (GameMode::showsGraphics())
    7575            {
    76                 this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
     76                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + multi_cast<std::string>(BillboardSet::billboardSetCounter_s++), count);
    7777                this->billboardSet_->createBillboard(position);
    7878                this->billboardSet_->setMaterialName(file);
     
    9797            if (GameMode::showsGraphics())
    9898            {
    99                 this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
     99                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + multi_cast<std::string>(BillboardSet::billboardSetCounter_s++), count);
    100100                this->billboardSet_->createBillboard(position, colour);
    101101                this->billboardSet_->setMaterialName(file);
  • code/branches/core4/src/orxonox/tools/Mesh.cc

    r3250 r3265  
    6868            try
    6969            {
    70                 this->entity_ = this->scenemanager_->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource);
     70                this->entity_ = this->scenemanager_->createEntity("Mesh" + multi_cast<std::string>(Mesh::meshCounter_s++), meshsource);
    7171                this->entity_->setCastShadows(this->bCastShadows_);
    7272
  • code/branches/core4/src/orxonox/tools/ParticleInterface.cc

    r3257 r3265  
    6969            try
    7070            {
    71                 this->particleSystem_ = this->scenemanager_->createParticleSystem("particles" + getConvertedValue<unsigned int, std::string>(ParticleInterface::counter_s++), templateName);
     71                this->particleSystem_ = this->scenemanager_->createParticleSystem("particles" + multi_cast<std::string>(ParticleInterface::counter_s++), templateName);
    7272                this->setSpeedFactor(1.0f);
    7373            }
  • code/branches/core4/src/orxonox/tools/TextureGenerator.cc

    r3196 r3265  
    7272        if (it == colourMap.end())
    7373        {
    74             std::string materialName = textureName + "_Material_" + convertToString(materialCount_s++);
     74            std::string materialName = textureName + "_Material_" + multi_cast<std::string>(materialCount_s++);
    7575            Ogre::MaterialPtr material = (Ogre::MaterialPtr)Ogre::MaterialManager::getSingleton().create(materialName, "General");
    7676            material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
Note: See TracChangeset for help on using the changeset viewer.