Rev | Line | |
---|
[790] | 1 | #pragma once
|
---|
| 2 | #include "TechniqueGroup.h"
|
---|
| 3 | #include "OgreSharedRuns.h"
|
---|
| 4 | #include "OgreRenderTechnique.h"
|
---|
| 5 | #include "Ogre.h"
|
---|
| 6 |
|
---|
| 7 | using namespace Ogre;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | @brief Base class of a SharedRuns in an OGRE environment.
|
---|
| 11 | */
|
---|
| 12 | class OgreTechniqueGroup : public TechniqueGroup,
|
---|
| 13 | public UserDefinedObject
|
---|
| 14 | {
|
---|
| 15 | public:
|
---|
[2320] | 16 | ~OgreTechniqueGroup();
|
---|
[790] | 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 | }
|
---|
[2355] | 31 | String getMaterialNameForTrigger(String trigger)
|
---|
| 32 | {
|
---|
| 33 | if(triggeredMaterials.find(trigger) == triggeredMaterials.end())
|
---|
| 34 | return "";
|
---|
| 35 | else return triggeredMaterials[trigger];
|
---|
| 36 | }
|
---|
[2366] | 37 | void setMaterialForTrigger(String trigger, String material)
|
---|
| 38 | {
|
---|
| 39 | triggeredMaterials[trigger] = material;
|
---|
| 40 | }
|
---|
[790] | 41 |
|
---|
| 42 | protected:
|
---|
[2355] | 43 | std::map<String, String> triggeredMaterials;
|
---|
[790] | 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.