[1055] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | //disable inheritance warning caused by multiple inheritance
|
---|
| 4 | #if _WIN32
|
---|
| 5 | #if _MSC_VER
|
---|
| 6 | #pragma warning(disable: 4250)
|
---|
| 7 | #endif
|
---|
| 8 | #endif
|
---|
| 9 |
|
---|
| 10 | #include "OgreRenderingRun.h"
|
---|
| 11 | #include "ChildPSystemRenderingRun.h"
|
---|
| 12 | #include "OgreSharedRuns.h"
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | /**
|
---|
| 16 | @brief ColorCubeMapRenderingRun used in an OGRE environment.
|
---|
| 17 | */
|
---|
| 18 | class OgreChildPSystemRenderingRun : public OgreRenderingRun,
|
---|
| 19 | public ChildPsystemRenderingRun
|
---|
| 20 | {
|
---|
| 21 | public:
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | @brief Constructor.
|
---|
| 25 |
|
---|
| 26 | @param sharedRuns a pointer to the OgreSharedRuns this run belongs to
|
---|
| 27 | @param name the name of the texture to be created
|
---|
| 28 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
| 29 | @param updateInterval update frequency
|
---|
| 30 | @param materialName the name of the material should be used when rendering the choton hit map
|
---|
| 31 | */
|
---|
| 32 | OgreChildPSystemRenderingRun(OgreSharedRuns* sharedRuns,
|
---|
| 33 | String name,
|
---|
| 34 | unsigned long startFrame,
|
---|
| 35 | unsigned long updateInterval,
|
---|
| 36 | unsigned int resolution,
|
---|
| 37 | bool perspectiveRendering,
|
---|
| 38 | String childParticleSystemName,
|
---|
| 39 | String particleScriptName,
|
---|
| 40 | bool useOwnMaterial,
|
---|
| 41 | String materialName
|
---|
| 42 | );
|
---|
| 43 | /**
|
---|
| 44 | @brief returns the name of the resulting photon hit map
|
---|
| 45 | */
|
---|
| 46 | String getImpostorTextureName(){return name;}
|
---|
| 47 |
|
---|
[1722] | 48 | bool canJoin(RenderingRun* run)
|
---|
[1055] | 49 | {
|
---|
| 50 |
|
---|
| 51 | return false;
|
---|
| 52 | }
|
---|
[1330] | 53 | void setNode(SceneNode* n){psysNode = n;}
|
---|
| 54 | Real getSmallSysRadius(){return sysRad;}
|
---|
| 55 |
|
---|
[1055] | 56 | protected:
|
---|
[1330] | 57 | SceneNode* psysNode;
|
---|
[1055] | 58 | bool perspectiveRendering;
|
---|
| 59 | bool useOwnMaterial;
|
---|
| 60 | String materialName;
|
---|
| 61 | String childParticleSystemName;
|
---|
| 62 | String particleScriptName;
|
---|
[1330] | 63 | Real sysRad;
|
---|
[1055] | 64 | /**
|
---|
| 65 | @brief the created photon hit map texture
|
---|
| 66 | */
|
---|
| 67 | Camera* impostorCamera;
|
---|
| 68 | /**
|
---|
| 69 | @brief a pointer to the OgreSharedRuns this run belongs to
|
---|
| 70 | */
|
---|
| 71 | OgreSharedRuns* sharedRuns;
|
---|
| 72 | /**
|
---|
| 73 | @brief the name of the photonmap texture that was created by this run
|
---|
| 74 | */
|
---|
| 75 | String name;
|
---|
| 76 | /**
|
---|
| 77 | @brief a pointer to the photonmap texture that was created by this run
|
---|
| 78 | */
|
---|
| 79 | Texture* impostorTexture;
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 | //inherited
|
---|
| 83 | void updateFrame(unsigned long frameNum);
|
---|
| 84 | //inherited
|
---|
| 85 | inline void createImpostorTexture();
|
---|
| 86 |
|
---|
| 87 | };
|
---|