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

Revision 2320, 3.0 KB checked in by szirmay, 18 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 "DepthShadowMapRenderingRun.h"
12#include "OgreSharedRuns.h"
13#include "OgreFocusingMapRenderingRun.h"
14
15
16/**
17        @brief DepthShadowMapRenderingRun used in an OGRE environment.
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
41        virtual ~OgreDepthShadowMapRenderingRun(){}
42
43
44        /**
45                @brief returns the depth shadow map texture created by this run
46        */
47        const String& getDepthMapTextureName();
48       
49        /**
50                @brief Refreshes light camera matrices, called in each update.
51        */
52        void refreshLight(unsigned long frameNum);
53        /**
54                @brief Retuns the view matrix of the camera from which the depth shadow map was created.
55        */
56        Matrix4 getLightViewMatrix();
57        /**
58                @brief Retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created.
59        */
60        Matrix4 getLightViewProjMatrix();
61        /**
62                @brief Retuns the far plane of the light projection.
63        */
64        Real getLightFarPlane(){return lightFarPlane;}
65
66        void freeAllResources();
67
68protected:     
69        /**
70                @brief The light source this depth shadow map belongs to.
71        */
72        Light* light;
73        /**
74                @brief Pointer to the camera of the lightsource.
75        */
76        Camera* depthMapCamera;
77        /**
78                @brief The name of the material to be used when rendering the depth shadow map.
79        */
80        String materialName;
81        /**
82                @brief A pointer to the OgreSharedRuns this run belongs to.
83        */
84        OgreSharedRuns* sharedRuns;
85        /**
86                @brief The name of the depth shadow map texture that was created by this run.
87        */
88        String name;
89        /**
90                @brief The name of the blurred depth shadow map texture that was created by this run.
91        */
92        String blurredname;
93        /**
94                @brief A pointer to the depth shadow texture that was created by this run.
95        */
96        Texture* depthMapTexture;
97        /**
98                @brief A pointer to the blurred depth shadow texture that was created by this run.
99        */
100        Texture* blurredDepthMapTexture;
101        Real lightFarPlane;
102       
103        //inherited
104        void updateFrame(unsigned long frameNum);       
105        //inherited
106        inline void createDepthMap();
107        //inherited
108        void updateDepthCubeFace(int facenum);
109        //inherited
110        void updateDepthMap();
111
112};
Note: See TracBrowser for help on using the repository browser.