source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreTechniqueGroup.h @ 2366

Revision 2366, 1.3 KB checked in by szirmay, 17 years ago (diff)
Line 
1#pragma once
2#include "TechniqueGroup.h"
3#include "OgreSharedRuns.h"
4#include "OgreRenderTechnique.h"
5#include "Ogre.h"
6
7using namespace Ogre;
8
9/**
10        @brief Base class of a SharedRuns in an OGRE environment.       
11*/
12class OgreTechniqueGroup : public TechniqueGroup,
13                                                        public UserDefinedObject
14{
15public:
16        ~OgreTechniqueGroup();
17        //inherited
18        void addRenderTechnique(RenderTechnique* technique);
19        //inherited
20        void update(unsigned long frameNum);
21        //inherited
22        void runChanged(RenderingRunType runType, RenderingRun* run);
23        //inherited
24        void runUpdated(RenderingRunType runType, RenderingRun* run);
25        //inherited
26        void updateBounds()
27        {
28                renderTechniques.at(0)->getParentRenderable()->updateBounds();
29                parentSharedRuns->updateBounds();               
30        }
31        String getMaterialNameForTrigger(String trigger)
32        {
33                if(triggeredMaterials.find(trigger) == triggeredMaterials.end())
34                        return "";
35                else return triggeredMaterials[trigger];
36        }
37        void setMaterialForTrigger(String trigger, String material)
38        {
39                triggeredMaterials[trigger] = material;
40        }
41
42protected:
43        std::map<String, String> triggeredMaterials;
44        /**
45                @brief Collection of OgreRenderTechniques
46
47                All messages will be forwarded to each element of this vector.
48        */
49        std::vector<OgreRenderTechnique*> renderTechniques;
50
51};
Note: See TracBrowser for help on using the repository browser.