source: GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/ConvolvedCubeMapRenderTechnique.h @ 1711

Revision 1711, 2.9 KB checked in by szirmay, 18 years ago (diff)
Line 
1#pragma once
2#include "CubeMapRenderTechnique.h"
3
4/**
5        @brief Base abstract class of rendering a color cube map which will be reduced.
6       
7        This technique defines that the final rendering of an object needs a reduced sized cubmap of the colors of the surrounding environment.
8        This reduced sized cubemap is created with averaging the original cubemap.
9        This reduced cubemap can easily be convolved in the final shading to acheve special effects like diffuse reflections.
10*/
11class ConvolvedCubeMapRenderTechnique : virtual public CubeMapRenderTechnique
12{
13public:
14        /**
15                @brief Constructor.
16
17                @param startFrame                                       adds an offset to the current frame number to help evenly distribute updates between frames
18                @param cubeMapUpdateInterval            update frequency
19                @param cubeMapResolution                        color cubemap resolution
20                @param reducedCubeMapResolution         the resolution of the reduced cube map
21                @param useDistCalc                                      flag to skip cube face update if object is far away
22                @param useFaceAngleCalc                         flag to skip cube face update if face is neglible
23                @param distTolerance                            distance tolerance used in face skip
24                @param angleTolerance                           angle tolerance used in face skip
25                @param updateAllFace                            defines if all cubemap faces should be updated in a frame or only one face per frame
26                @param parentRenderable                         the object to operate on
27                @param parentTechniqueGroup                     the TechniqueGroup this RenderedTechnique is attached to
28        */
29        ConvolvedCubeMapRenderTechnique( unsigned long startFrame,
30                                                        unsigned long cubeMapUpdateInterval,
31                                                        unsigned int cubeMapResolution,
32                                                        unsigned int reducedCubeMapResolution,
33                                                        bool useDistCalc,
34                                                        bool useFaceAngleCalc,
35                                                        float distTolerance,
36                                                        float angleTolerance,
37                                                        bool updateAllFace,
38                                                        bool renderSelf,
39                                                        ElementaryRenderable* parentRenderable,
40                                                        TechniqueGroup* parentTechniqueGroup
41                                                        );
42        ~ConvolvedCubeMapRenderTechnique();
43       
44        /**
45                        @brief Updates the resources in the given frame.
46
47                        @param frameNum the actual framenumber
48        */
49        virtual void update(unsigned long frameNum);
50
51        //inherited
52        void runChanged(RenderingRunType runType, RenderingRun* run);
53
54protected:
55
56        unsigned int reducedCubeMapResolution;
57        /**
58                        @brief Called if the changed run is a ColorCubeMapRenderingRun.
59
60                        @param run pointer to the changed ColorCubeMapRenderingRun
61        */             
62        virtual void reducedCubeMapRunChanged(RenderingRun* run) = 0;
63        /**
64                        @brief Called if the changed run is a ColorCubeMapRenderingRun.
65
66                        @param run pointer to the changed ColorCubeMapRenderingRun
67        */             
68        virtual void colorCubeMapRunChanged(RenderingRun* run) = 0;
69        /**
70                        @brief Creates a ColorCubeMapRenderingRun.
71
72                        @return the new ColorCubeMapRenderingRun instance.
73        */
74        virtual RenderingRun* createColorCubeMapRun() = 0;
75        /**
76                        @brief Creates a ColorCubeMapRenderingRun.
77
78                        @return the new ColorCubeMapRenderingRun instance.
79        */
80        virtual RenderingRun* createReducedCubeMapRun() = 0;
81};
Note: See TracBrowser for help on using the repository browser.