Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2012, 5:00:19 PM (12 years ago)
Author:
davidsa
Message:

Added some documentation to orxonox::Model and refined the XML Port for renderQueueGroup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shaders/src/orxonox/graphics/Model.cc

    r9407 r9422  
    3636#include "core/XMLPort.h"
    3737#include "Scene.h"
     38#include "RenderQueueListener.h"
    3839#include "graphics/MeshLodInformation.h"
    3940#include "Level.h"
     
    7475        XMLPortParam(Model, "material", setMaterial, getMaterial, xmlelement, mode);
    7576        XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     77    }
     78   
     79    /**
     80    @brief
     81        This function turns a string from XML Port into a usable ID for the rendering system
     82        It defaults to the main queue if the group isn't recognized.
     83       
     84    @param renderQueueGroup
     85        This is a string representing the render queue group. Accepted values:
     86        'main', 'stencil glow', 'stencil object'
     87    */
     88    const unsigned int Model::getRenderQueueGroupID(const std::string& renderQueueGroup) const
     89    {
     90        if(renderQueueGroup.compare("stencil glow")==0)
     91        {
     92            return RENDER_QUEUE_STENCIL_GLOW;
     93        }
     94        if(renderQueueGroup.compare("stencil object")==0)
     95        {
     96            return RENDER_QUEUE_STENCIL_OBJECTS;
     97        }
     98        return RENDER_QUEUE_MAIN;
    7699    }
    77100
     
    107130                this->attachOgreObject(this->mesh_.getEntity());
    108131                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
     132                this->mesh_.getEntity()->setRenderQueueGroup(this->renderQueueGroup_);
    109133                this->mesh_.setVisible(this->isVisible());
    110134
Note: See TracChangeset for help on using the changeset viewer.