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

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