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

Revision 2264, 2.0 KB checked in by szirmay, 17 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 "OgreSharedRuns.h"
12
13
14/**
15        @brief FocusingMapRenderingRun.
16
17        A run to help focusing light projections for shadow mapping.
18*/
19class OgreFocusingMapRenderingRun : public OgreRenderingRun                                                                     
20{       
21public:
22
23        /**
24                @brief Constructor.
25                @param name                             the name of the focusing map texture to be created
26                @param lightMatrix      the light matrix to be focused
27                @param focusingMapSize  size of the focusing map               
28        */     
29        OgreFocusingMapRenderingRun(String name,
30                                                                Matrix4 lightMatrix,
31                                                                unsigned int focusingMapSize);
32        /**
33                @brief returns the name of the focusing texture
34        */
35        String getFocusingTextureName(){return name;}
36        /**
37                @brief gets the boundig box min-max points
38
39                These values are given in light space and can be used to adjust the light matrices to focuse on important objects only.
40        */
41        void getMinMax(Vector3& min, Vector3& max);
42        /**
43                @brief Sets the light matrix that should be  focused.
44        */
45        void setLightMatrix(Matrix4 &m){this->lightMatrix = m;}
46        /**
47                @brief Sets the player camera matrices.         
48        */
49        void setCameraMatrices(const Matrix4 &view, const Matrix4 &projection);
50       
51protected:
52        /**
53                @brief light matrix to be focused       
54        */
55        Matrix4 lightMatrix;
56        /**
57                @brief fosusing map camera     
58        */
59        Camera* camera;
60       
61        /**
62                @brief the name of the focusing texture that was created by this run
63        */
64        String name;
65        /**
66                @brief a pointer to the focusing texture that was created by this run
67        */
68        Texture* focusingTexture;
69        /**
70                @brief the size of the focusing map
71        */
72        unsigned int focusingMapSize;
73
74        //inherited
75        void updateFrame(unsigned long frameNum);       
76        /**
77                @brief creates the focusing map texture
78        */
79        inline void createFocusingMap();
80        //inherited
81        bool needUpdate(unsigned long frameNum )
82        {
83                return true;
84        }
85
86};
Note: See TracBrowser for help on using the repository browser.