source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreConvolvedCubeMapRenderTechnique.h @ 1886

Revision 1886, 2.9 KB checked in by szirmay, 18 years ago (diff)
Line 
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 "ConvolvedCubeMapRenderTechnique.h"
11#include "OgreCubeMapRenderTechnique.h"
12#include "Ogre.h"
13
14using namespace Ogre;
15
16/**
17        @brief ConvolvedCubeMapRenderTechnique used in an Ogre environment.
18*/
19class OgreConvolvedCubeMapRenderTechnique :     public ConvolvedCubeMapRenderTechnique,
20                                                                                        public OgreCubeMapRenderTechnique
21{
22public:
23
24        /**
25                @brief Constructor.
26
27                @param startFrame                                       adds an offset to the current frame number to help evenly distribute updates between frames
28                @param cubeMapUpdateInterval            update frequency
29                @param cubeMapResolution                        color cubemap resolution
30                @param reducedCubeMapResolution         reduced sized color cubemap resolution
31                @param reducedTexID                                     the id of the texture unit state the resulting cubemap should be bound to
32                @param useDistCalc                                      flag to skip cube face update if object is far away
33                @param useFaceAngleCalc                         flag to skip cube face update if face is neglible
34                @param distTolerance                            distance tolerance used in face skip
35                @param angleTolerance                           angle tolerance used in face skip
36                @param updateAllFace                            defines if all cubemap faces should be updated in a frame or only one face per frame
37                @param pass                                                     the pass to operate on                 
38                @param parentRenderable                         the object to operate on
39                @param parentTechniqueGroup                     the TechniqueGroup this RenderedTechnique is attached to
40        */
41        OgreConvolvedCubeMapRenderTechnique( unsigned long startFrame,
42                                                        unsigned long cubeMapUpdateInterval,
43                                                        unsigned int cubeMapResolution,
44                                                        unsigned int reducedCubeMapResolution,
45                                                        unsigned char texID,
46                                                        bool useDistCalc,
47                                                        bool useFaceAngleCalc,
48                                                        float distTolerance,
49                                                        float angleTolerance,
50                                                        bool updateAllFace,
51                                                        bool renderSelf,
52                                                        bool renderEnvironment,
53                                                        String selfMaterial,
54                                                        String environmentMaterial,
55                                                        bool getMinMax,
56                                                        bool attachToTexUnit,
57                                                        String minVariableName,
58                                                        String maxVariableName,
59                                                        Pass* pass,
60                                                        OgreRenderable* parentRenderable,
61                                                        OgreTechniqueGroup* parentTechniqueGroup
62                                                        );
63        /**
64                @brief Destructor.
65        */
66        ~OgreConvolvedCubeMapRenderTechnique();
67       
68        //inherited
69        void update(unsigned long frameNum);
70       
71protected:     
72       
73        //inherited
74        void reducedCubeMapRunChanged(RenderingRun* run);
75        //inherited
76        void colorCubeMapRunChanged(RenderingRun* run);
77        //inherited
78        RenderingRun* createReducedCubeMapRun();
79       
80};
81
82
83
84class OgreConvoledCubeMapRenderTechniqueFactory : public OgreCubeMapRenderTechniqueFactory
85{
86public:
87       
88        OgreConvoledCubeMapRenderTechniqueFactory();
89
90        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
91                                                                                Pass* pass,
92                                                                                OgreRenderable* parentRenderable,
93                                                                                OgreTechniqueGroup* parentTechniqueGroup);
94
95
96        unsigned int reducedCubeMapResolution;
97};
Note: See TracBrowser for help on using the repository browser.