source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreDepthShadowMapRenderingRun.h @ 2379

Revision 2379, 3.1 KB checked in by szirmay, 17 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 "OgreRenderingRun.h"
11#include "DepthShadowMapRenderingRun.h"
12#include "OgreSharedRuns.h"
[1103]13#include "OgreFocusingMapRenderingRun.h"
[790]14
15
16/**
[2251]17        @brief DepthShadowMapRenderingRun used in an OGRE environment.
[790]18*/
19class OgreDepthShadowMapRenderingRun : public OgreRenderingRun,
20                                                                        public DepthShadowMapRenderingRun
21{       
22public:
23
24        /**
25                @brief Constructor.
26
27                @param sharedRuns                       a pointer to the OgreSharedRuns this run belongs to
28                @param name                                     the name of the depth map texture to be created
29                @param light                            the light source this depth shadow map belongs to
30                @param resolutionX                      the resolution width of the depth shadow map
31                @param resolutionY                      the resolution height of the depth shadow map
32                @param materialName                     the name of the material to be used when rendering the depth shadow map
33        */     
34        OgreDepthShadowMapRenderingRun(OgreSharedRuns* sharedRuns,
35                                                                                String name,
36                                                                                Light* light,
37                                                                                unsigned int resolutionX,
38                                                                                unsigned int resolutionY,
39                                                                                String materialName);
40
[2320]41        virtual ~OgreDepthShadowMapRenderingRun(){}
42
43
[790]44        /**
45                @brief returns the depth shadow map texture created by this run
46        */
[1688]47        const String& getDepthMapTextureName();
[1628]48       
[790]49        /**
50                @brief Refreshes light camera matrices, called in each update.
51        */
[1103]52        void refreshLight(unsigned long frameNum);
[790]53        /**
[2264]54                @brief Retuns the view matrix of the camera from which the depth shadow map was created.
[790]55        */
[1120]56        Matrix4 getLightViewMatrix();
[790]57        /**
[2264]58                @brief Retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created.
[790]59        */
[1120]60        Matrix4 getLightViewProjMatrix();
[2264]61        /**
62                @brief Retuns the far plane of the light projection.
63        */
[1670]64        Real getLightFarPlane(){return lightFarPlane;}
[790]65
[2320]66        void freeAllResources();
67
[2379]68        bool  renderableQueued (Renderable *rend, uint8 groupID, ushort priority, Technique **ppTech);
69
[790]70protected:     
71        /**
[2264]72                @brief The light source this depth shadow map belongs to.
[790]73        */
74        Light* light;
75        /**
[2264]76                @brief Pointer to the camera of the lightsource.
[790]77        */
[1120]78        Camera* depthMapCamera;
[790]79        /**
[2264]80                @brief The name of the material to be used when rendering the depth shadow map.
[790]81        */
82        String materialName;
83        /**
[2264]84                @brief A pointer to the OgreSharedRuns this run belongs to.
[790]85        */
86        OgreSharedRuns* sharedRuns;
87        /**
[2264]88                @brief The name of the depth shadow map texture that was created by this run.
[790]89        */
[1120]90        String name;
[2264]91        /**
92                @brief The name of the blurred depth shadow map texture that was created by this run.
93        */
[1130]94        String blurredname;
[790]95        /**
[2264]96                @brief A pointer to the depth shadow texture that was created by this run.
[790]97        */
[1120]98        Texture* depthMapTexture;
[2264]99        /**
100                @brief A pointer to the blurred depth shadow texture that was created by this run.
101        */
[1130]102        Texture* blurredDepthMapTexture;
[1670]103        Real lightFarPlane;
[2379]104        String triggerName;
[790]105       
106        //inherited
107        void updateFrame(unsigned long frameNum);       
108        //inherited
109        inline void createDepthMap();
110        //inherited
111        void updateDepthCubeFace(int facenum);
112        //inherited
113        void updateDepthMap();
114
115};
Note: See TracBrowser for help on using the repository browser.