source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreChildPSystemRenderingRun.h @ 2320

Revision 2320, 3.1 KB checked in by szirmay, 17 years ago (diff)
RevLine 
[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/**
[2240]16        @brief ChildPsystemRenderingRun used in an OGRE environment.
[1055]17*/
18class OgreChildPSystemRenderingRun : public OgreRenderingRun,
19                                                                        public ChildPsystemRenderingRun
20{       
21public:
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
[2240]30                @param resolution                       resolution of the impostor texture
31                @param perspectiveRendering     sets if the impostor should be rendered with a perspective projection or orthogonal
32                @param childPSysScriptName      the name of the particle system script
33                @param useOwnMaterial           use the material that was defined in the particle script
34                @param materialName                     use this specific material while rendering the impostor
35               
[1055]36*/     
37        OgreChildPSystemRenderingRun(OgreSharedRuns* sharedRuns,
38                                                                String name,
39                                                                unsigned long startFrame,
40                                                                unsigned long updateInterval,
41                                                                unsigned int resolution,
42                                                                bool perspectiveRendering,
43                                                                String childParticleSystemName,
44                                                                String particleScriptName,
45                                                                bool useOwnMaterial,
46                                                                String materialName
47                                                                );
[2320]48
49        virtual ~OgreChildPSystemRenderingRun(){}
50
[1055]51        /**
52                @brief returns the name of the resulting photon hit map
53        */
54        String getImpostorTextureName(){return name;}
[2240]55        //inherited
[1722]56        bool canJoin(RenderingRun* run)
[1055]57        {
58               
59                return false;
60        }
[1330]61        void setNode(SceneNode* n){psysNode = n;}
[2251]62        /**
63                @brief Returns the radius of the small particle system.
64        */
[1330]65        Real getSmallSysRadius(){return sysRad;}
66
[2320]67        void freeAllResources();
68
[1055]69protected:     
[1330]70        SceneNode* psysNode;
[2251]71        /**
72                @brief Sets if the impostor should be rendered with a perspective projection or orthogonal.
73        */
[1055]74        bool perspectiveRendering;
[2251]75        /**
76                @brief Use the material that was defined in the particle script.
77        */
[1055]78        bool useOwnMaterial;
[2251]79        /**
80                @brief Use this specific material while rendering the impostor.
81        */
[1055]82        String materialName;
[2251]83        /**
84                @brief The name of the small particle system.
85        */
[1055]86        String childParticleSystemName;
[2251]87        /**
88                @brief The name of the small particle system script.
89        */
[1055]90        String particleScriptName;
[2251]91        /**
92                @brief Radius of the small particle system.
93        */
[1330]94        Real sysRad;
[1055]95        /**
[2251]96                @brief Camera used while rendering the impostor image.
[1055]97        */
98        Camera* impostorCamera;
99        /**
[2251]100                @brief A pointer to the OgreSharedRuns this run belongs to.
[1055]101        */
102        OgreSharedRuns* sharedRuns;
103        /**
[2251]104                @brief The name of the imostor texture that was created by this run.
[1055]105        */
106        String name;
107        /**
[2251]108                @brief A pointer to the impostor texture that was created by this run.
[1055]109        */
110        Texture* impostorTexture;
111       
112
113        //inherited
114        void updateFrame(unsigned long frameNum);       
115        //inherited
116        inline void createImpostorTexture();
117
118};
Note: See TracBrowser for help on using the repository browser.