source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/precompiled/include/IllumModule/RenderTechniques/DistanceCubeMapRenderTechnique.h @ 3255

Revision 3255, 2.7 KB checked in by szirmay, 15 years ago (diff)
Line 
1#pragma once
2#include "CubeMapRenderTechnique.h"
3
4/**
5        @brief Base abstract class __declspec( dllexport ) of rendering a distance cube map.
6       
7        This technique defines that the final rendering of an object needs a cubemap of the distance of the surrounding environment from the cubemap center.
8*/
9class __declspec( dllexport ) DistanceCubeMapRenderTechnique : virtual public CubeMapRenderTechnique
10{
11public:
12        /**
13                @brief Constructor.
14
15                @param startFrame                               adds an offset to the current frame number to help evenly distribute updates between frames
16                @param cubeMapUpdateInterval    update frequency
17                @param cubeMapResolution                distance cubemap resolution
18                @param useDistCalc                              flag to skip cube face update if object is far away
19                @param useFaceAngleCalc                 flag to skip cube face update if face is neglible
20                @param distTolerance                    distance tolerance used in face skip
21                @param angleTolerance                   angle tolerance used in face skip
22                @param updateAllFace                    defines if all cubemap faces should be updated in a frame or only one face per frame
23                @param renderSelf                               sets if the object should be rendered to the cube map
24                @param renderEnvironment                sets if the environment should be rendered to the cube map
25                @param layer                                    the layer of this cubemap
26                @param parentRenderable                 the object to operate on
27                @param parentTechniqueGroup             the TechniqueGroup this RenderedTechnique is attached to
28        */
29        DistanceCubeMapRenderTechnique( unsigned long startFrame,
30                                                        unsigned long cubeMapUpdateInterval,
31                                                        unsigned int cubeMapResolution,                                                                                         
32                                                        bool useDistCalc,
33                                                        bool useFaceAngleCalc,
34                                                        float distTolerance,
35                                                        float angleTolerance,
36                                                        bool updateAllFace,
37                                                        bool renderSelf,
38                                                        bool renderEnvironment,
39                                                        int layer,
40                                                        ElementaryRenderable* parentRenderable,
41                                                        TechniqueGroup* parentTechniqueGroup
42                                                        );
43        virtual ~DistanceCubeMapRenderTechnique();
44       
45        /**
46                        @brief Updates the resources in the given frame.
47
48                        @param frameNum the actual framenumber
49        */
50        virtual void update(unsigned long frameNum);
51
52        //inherited
53        virtual void runUpdated(RenderingRunType runType, RenderingRun* run);
54        //inherited
55        void runChanged(RenderingRunType runType, RenderingRun* run);
56
57protected:
58       
59        /**
60                        @brief Called if the changed run is a CubeMapRenderingRun (containing distances of the current layer).
61
62                        @param run pointer to the changed CubeMapRenderingRun
63        */             
64        virtual void distanceCubeMapRunChanged(RenderingRun* run) = 0;
65        /**
66                        @brief Called if the changed run is a CubeMapRenderingRun (containing distances of the current layer).
67
68                        @param run pointer to the changed CubeMapRenderingRun
69        */             
70        virtual void distanceCubeMapRunUpdated(RenderingRun* run) = 0;
71       
72};
Note: See TracBrowser for help on using the repository browser.