source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCubeMapRenderTechnique.h @ 1725

Revision 1725, 3.0 KB checked in by szirmay, 18 years ago (diff)
RevLine 
[790]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 "CubeMapRenderTechnique.h"
11#include "OgreRenderTechnique.h"
12#include "Ogre.h"
13
14using namespace Ogre;
15
16/**
17        @brief CubeMapRenderTechnique used in an Ogre environment.
18*/
[1711]19class OgreCubeMapRenderTechnique :      virtual public CubeMapRenderTechnique,
[790]20                                                                        public OgreRenderTechnique
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 texID                                    the id of the texture unit state the resulting cubemap should be bound to
31                @param useDistCalc                              flag to skip cube face update if object is far away
32                @param useFaceAngleCalc                 flag to skip cube face update if face is neglible
33                @param distTolerance                    distance tolerance used in face skip
34                @param angleTolerance                   angle tolerance used in face skip
35                @param updateAllFace                    defines if all cubemap faces should be updated in a frame or only one face per frame
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        */
40        OgreCubeMapRenderTechnique( unsigned long startFrame,
41                                                        unsigned long cubeMapUpdateInterval,
42                                                        unsigned int cubeMapResolution,                                                                                         
43                                                        unsigned char texID,
44                                                        bool useDistCalc,
45                                                        bool useFaceAngleCalc,
46                                                        float distTolerance,
47                                                        float angleTolerance,
48                                                        bool updateAllFace,
[1711]49                                                        bool renderSelf,
[1722]50                                                        bool renderEnvironment,
51                                                        String selfMaterial,
52                                                        String environmentMaterial,
[1725]53                                                        int layer,
[790]54                                                        Pass* pass,
55                                                        OgreRenderable* parentRenderable,
[1722]56                                                        OgreTechniqueGroup* parentTechniqueGroup,
57                                                        bool createCubeRun = false
[790]58                                                        );
59        /**
60                @brief Destructor.
61        */
62        ~OgreCubeMapRenderTechnique();
[1722]63       
[1711]64               
[790]65protected:
66               
67        /**
68                @brief the id of the texture unit state the resulting cubemap should be bound to
69        */
[1722]70        unsigned char texID;
71        String selfMaterial;
72        String environmentMaterial;
73        String texturePostFix;
74
75        RenderingRun* createCubeMapRun();
76        void cubeMapRunChanged(RenderingRun* run);     
[836]77};
78
[1711]79class OgreCubeMapRenderTechniqueFactory : public RenderTechniqueFactory
[836]80{
81public:
82       
[1711]83        OgreCubeMapRenderTechniqueFactory();
[1722]84
85        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
86                                                                                Pass* pass,
87                                                                                OgreRenderable* parentRenderable,
88                                                                                OgreTechniqueGroup* parentTechniqueGroup);
89
90        void resetParams();
[1711]91       
[836]92        unsigned long startFrame;
93        unsigned long cubeMapUpdateInterval;
94        unsigned int cubeMapResolution;                                                                                         
95        unsigned char texID;
96        bool useDistCalc;
97        bool useFaceAngleCalc;
98        float distTolerance;
99        float angleTolerance;
100        bool updateAllFace;
[1711]101        bool renderSelf;
[1722]102        bool renderEnvironment;
103        String selfMaterial;
104        String environmentMaterial;
[1725]105        int layer;
[1711]106};
Note: See TracBrowser for help on using the repository browser.