source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreHierarchicalParticleSystemTechnique.h @ 2320

Revision 2320, 4.5 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 "OgreRenderTechnique.h"
11#include "HierarchicalParticleSystemTechnique.h"
12
13/**
[2240]14        @brief HierarchicalParticleSystemTechnique used in an OGRE environment.
[1055]15*/
16class OgreHierarchicalParticleSystemTechnique : public OgreRenderTechnique,
17                                                                                        public HierarchicalParticleSystemTechnique
18{
19public:
[2240]20        /**
21                @brief Constructor.
[1055]22
[2240]23                @param startFrame                               adds an offset to the current frame number to help evenly distribute updates between frames
24                @param impostorUpdateInterval   update frequency of the impostor texture (image of the smaller system)
25                @param impostorResolution               resolution of the impostor texture
26                @param impostorTexID                    the id of the texture unit state the impostor image should be bound to
27                @param useDistCalc                              flag to skip impostor update if object is far away (//not used)
28                @param perspectiveRendering             sets if the impostor should be rendered with a perspective projection or orthogonal
29                @param childPSysScriptName              name of the small particle system script
30                @param useOwnMaterial                   use the material for the smaller system that was defined in the particle script
31                @param impostorMaterialName             use this specific material for the small particle system
32                @param useVParam                                bound particle radius to a gpu vertex program parameter
33                @param VParamRadius                             name of the gpu vertex program parameter the particle radius should be bound to
34                @param useFParam                                bound particle radius to a gpu fragment program parameter
35                @param FParamRadius                             name of the gpu fragment program parameter the particle radius should be bound to
36                @param pass                                             the pass to operate on                 
37                @param parentRenderable                 the object to operate on
38                @param parentTechniqueGroup             the TechniqueGroup this RenderedTechnique is attached to
39        */
[1055]40        OgreHierarchicalParticleSystemTechnique(unsigned long startFrame,
41                                                        unsigned long impostorUpdateInterval,
42                                                        unsigned int impostorResolution,
43                                                        unsigned char impostorTexID,
44                                                        bool useDistCalc,
45                                                        bool perspectiveRendering,
46                                                        String childPSysScriptName,
47                                                        bool useOwnMaterial,
48                                                        String impostorMaterialName,
[1330]49                                                        bool useVParam,
50                                                        String VParamRadius,
51                                                        bool useFParam,
52                                                        String FParamRadius,
[1055]53                                                        Pass* pass,
54                                                        OgreRenderable* parentRenderable,
55                                                        OgreTechniqueGroup* parentTechniqueGroup
56                                                        );
57        /**
58                @brief Destructor.
59        */
[2320]60        virtual ~OgreHierarchicalParticleSystemTechnique();
[1330]61
[1425]62               
[1055]63protected:
[2240]64        /**
65                @brief use this specific material for the small particle system
66        */
[1055]67        String impostorMaterialName;
[2240]68        /**
69                @brief name of the small particle system script
70        */
[1055]71        String childPSysScriptName;
[2240]72        /**
73                @brief name of the created child particle system
74        */
[1055]75        String childPSysName;
[2240]76        /**
77                @brief the id of the texture unit state the impostor image should be bound to
78        */
[1055]79        unsigned char impostorTexID;
[2240]80        /**
81                @brief use the material for the smaller system that was defined in the particle script
82        */
[1055]83        bool useOwnMaterial;
[2240]84        /**
85                @brief name of the gpu vertex program parameter the particle radius should be bound to
86        */
[1330]87        String VParamRadius;
[2240]88        /**
89                @brief name of the gpu fragment program parameter the particle radius should be bound to
90        */
[1330]91        String FParamRadius;
[2240]92        /**
93                @brief bound particle radius to a gpu vertex program parameter
94        */
[1330]95        bool useVParam;
[2240]96        /**
97                @brief bound particle radius to a gpu fragment program parameter
98        */
[1330]99        bool useFParam;
[1055]100       
101        //inherited
102        RenderingRun* createChildPSysRenderingRun();
[2240]103        //inherited
[1425]104        RenderingRun* createLightVolumeRenderingRun();
[2240]105        //inherited
[1062]106        virtual void impostorChanged(RenderingRun* run);
[2240]107        //inherited
[1425]108        virtual void impostorUpdated(RenderingRun* run);
[1055]109};
110
[2240]111/**
112        @brief RenderTechniqueFactory to create OgreHierarchicalParticleSystemTechnique instances.
113*/
[1055]114class OgreHierarchicalParticleSystemTechniqueFactory : public RenderTechniqueFactory
115{
116public:
117       
118        OgreHierarchicalParticleSystemTechniqueFactory();
119
120        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
121                                                                                Pass* pass,
122                                                                                OgreRenderable* parentRenderable,
123                                                                                OgreTechniqueGroup* parentTechniqueGroup);
124
125
126        unsigned long impostorUpdateInterval;
127        unsigned int impostorResolution;
128        unsigned long startFrame;       
129        bool useDistCalc;
130        unsigned char impostorTexID;
131        bool perspectiveRendering;
132        String impostorMaterialName;
133        String childPSysScriptName;
134        bool useOwnMaterial;
[1330]135        String VParamRadius;
136        String FParamRadius;
137        bool useVParam;
138        bool useFParam;
[1055]139
140};
Note: See TracBrowser for help on using the repository browser.