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

Revision 1055, 2.5 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
14
15/**
16        @brief ColorCubeMapRenderingRun used in an OGRE environment.
17*/
18class OgreDepthShadowMapRenderingRun : public OgreRenderingRun,
19                                                                        public DepthShadowMapRenderingRun
20{       
21public:
22
23        /**
24                @brief Constructor.
25
26                @param sharedRuns                       a pointer to the OgreSharedRuns this run belongs to
27                @param name                                     the name of the depth map texture to be created
28                @param light                            the light source this depth shadow map belongs to
29                @param resolutionX                      the resolution width of the depth shadow map
30                @param resolutionY                      the resolution height of the depth shadow map
31                @param materialName                     the name of the material to be used when rendering the depth shadow map
32        */     
33        OgreDepthShadowMapRenderingRun(OgreSharedRuns* sharedRuns,
34                                                                                String name,
35                                                                                Light* light,
36                                                                                unsigned int resolutionX,
37                                                                                unsigned int resolutionY,
38                                                                                String materialName);
39
40        /**
41                @brief returns the depth shadow map texture created by this run
42        */
43        String getDepthMapTextureName(int i){return names[i];}
44        /**
45                @brief Refreshes light camera matrices, called in each update.
46        */
47        void refreshLight();
48        /**
49                @brief retuns the view matrix of the camera from which the depth shadow map was created
50        */
51        Matrix4 getLightViewMatrix(int i);
52        /**
53                @brief retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created
54        */
55        Matrix4 getLightViewProjMatrix(int i);
56
57protected:     
58        /**
59                @brief the light source this depth shadow map belongs to
60        */
61        Light* light;
62        /**
63                @brief pointer to the camera of the lightsource
64        */
65        Camera* depthMapCameras[2];
66        /**
67                @brief the name of the material to be used when rendering the depth shadow map
68        */
69        String materialName;
70        /**
71                @brief a pointer to the OgreSharedRuns this run belongs to
72        */
73        OgreSharedRuns* sharedRuns;
74        /**
75                @brief the name of the depth shadow map texture that was created by this run
76        */
77        String names[2];
78        /**
79                @brief a pointer to the depth shadow texture that was created by this run
80        */
81        Texture* depthMapTextures[2];
82       
83        //inherited
84        void updateFrame(unsigned long frameNum);       
85        //inherited
86        inline void createDepthMap();
87        //inherited
88        void updateDepthCubeFace(int facenum);
89        //inherited
90        void updateDepthMap();
91
92};
Note: See TracBrowser for help on using the repository browser.