source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/precompiled/include/OgreIllumModule/RenderingRuns/OgreCubeMapRenderingRun.h @ 3255

Revision 3255, 3.3 KB checked in by szirmay, 15 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 "OgreRenderingRun.h"
11#include "CubeMapRenderingRun.h"
12#include "OgreSharedRuns.h"
13
14
15/**
16        @brief CubeMapRenderingRun used in an OGRE environment.
17*/
18class __declspec( dllexport ) OgreCubeMapRenderingRun : public OgreRenderingRun,
19                                                                public CubeMapRenderingRun
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 cubemap 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 resolution                       cubemap resolution
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 renderSelf                       sets if the object should be rendered to the cube map
37                @param renderEnvironment        sets if the environment should be rendered to the cube map
38                @param selfMaterial                     the material that should be set for the object while rendering the cubemap
39                @param environmentMaterial  the material that should be set for the environment while rendering the cubemap
40                @param getMinMax                        sets if the minimum and maximum values of the cubemap should be computed               
41        */     
42        OgreCubeMapRenderingRun(OgreSharedRuns* sharedRuns,
43                                                                 String name,
44                                                                 unsigned long startFrame,
45                                                                 unsigned long updateInterval,
46                                                                 unsigned int resolution,
47                                                                 bool useDistCalc,
48                                                                 bool useFaceAngleCalc,
49                                                                 float distTolerance,
50                                                                 float angleTolerance,
51                                                                 bool updateAllFace,
52                                                                 bool renderSelf,
53                                                                 bool renderEnvironment,
54                                                                 String selfMaterial,
55                                                                 String environmentMaterial,
56                                                                 String envTriggerName,
57                                                                 bool getMinMax,
58                                                                 RenderingRunType cubemapRunType);
59
60        virtual ~OgreCubeMapRenderingRun(){}
61
62        /**
63                @brief returns the name of the resulting color cubemap texture
64        */
65        String getCubeMapTextureName(){return name;}
66
67        Vector4 getMax(){return max;}
68        Vector4 getMin(){return min;}
69
70        void freeAllResources();
71       
72protected:
73
74        /**
75                @brief A pointer to the OgreSharedRuns this run belongs to.
76        */
77        OgreSharedRuns* sharedRuns;
78        /**
79                @brief The name of the cubemap texture that was created by this run.
80        */
81        String name;
82        /**
83                @brief A pointer to the cubemap texture that was created by this run.
84        */
85        Texture* cubemapTexture;
86        /**
87                @brief
88        */
89        String selfMaterial;
90        /**
91                @brief
92        */
93        bool useSelfMaterial;
94        /**
95                @brief
96        */
97        String environmentMaterial;
98        /**
99                @brief
100        */
101        bool useEnvMaterial;
102        RenderingRunType cubemapRunType;
103
104        Vector4 min;
105        Vector4 max;
106
107        String envTriggerName;
108
109        /**
110                @brief
111        */
112        bool getMinMax;
113       
114        void getCubeMapMinMax();
115        //inherited
116        inline void createCubeMap();
117        //inherited
118        inline void updateCubeFace(int facenum);
119        //inherited
120    bool faceNeedsUpdate(int facenum); 
121};
Note: See TracBrowser for help on using the repository browser.