source: GTP/trunk/Lib/Illum/IllumModule/IllumModule/include/RenderTechniques/DistanceCubeMapRenderTechnique.h @ 2320

Revision 2320, 2.7 KB checked in by szirmay, 17 years ago (diff)
RevLine 
[780]1#pragma once
[1711]2#include "CubeMapRenderTechnique.h"
[780]3
4/**
5        @brief Base abstract class of rendering a distance cube map.
6       
[2285]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.
[780]8*/
[1711]9class DistanceCubeMapRenderTechnique : virtual public CubeMapRenderTechnique
[780]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
[2240]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
[780]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,
[1711]37                                                        bool renderSelf,
[1722]38                                                        bool renderEnvironment,
[1725]39                                                        int layer,
[780]40                                                        ElementaryRenderable* parentRenderable,
41                                                        TechniqueGroup* parentTechniqueGroup
42                                                        );
[2320]43        virtual ~DistanceCubeMapRenderTechnique();
[780]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:
[1725]58       
[780]59        /**
[2240]60                        @brief Called if the changed run is a CubeMapRenderingRun (containing distances of the current layer).
[780]61
[2240]62                        @param run pointer to the changed CubeMapRenderingRun
[780]63        */             
64        virtual void distanceCubeMapRunChanged(RenderingRun* run) = 0;
65        /**
[2240]66                        @brief Called if the changed run is a CubeMapRenderingRun (containing distances of the current layer).
[780]67
[2240]68                        @param run pointer to the changed CubeMapRenderingRun
[780]69        */             
70        virtual void distanceCubeMapRunUpdated(RenderingRun* run) = 0;
[1722]71       
[780]72};
Note: See TracBrowser for help on using the repository browser.