[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 | /**
|
---|
| 17 | @brief ColorCubeMapRenderingRun used in an OGRE environment.
|
---|
| 18 | */
|
---|
| 19 | class OgreDepthShadowMapRenderingRun : public OgreRenderingRun,
|
---|
| 20 | public DepthShadowMapRenderingRun
|
---|
| 21 | {
|
---|
| 22 | public:
|
---|
| 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 | */
|
---|
[1120] | 44 | String getDepthMapTextureName(){return name;}
|
---|
[790] | 45 | /**
|
---|
| 46 | @brief Refreshes light camera matrices, called in each update.
|
---|
| 47 | */
|
---|
[1103] | 48 | void refreshLight(unsigned long frameNum);
|
---|
[790] | 49 | /**
|
---|
| 50 | @brief retuns the view matrix of the camera from which the depth shadow map was created
|
---|
| 51 | */
|
---|
[1120] | 52 | Matrix4 getLightViewMatrix();
|
---|
[790] | 53 | /**
|
---|
| 54 | @brief retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created
|
---|
| 55 | */
|
---|
[1120] | 56 | Matrix4 getLightViewProjMatrix();
|
---|
[790] | 57 |
|
---|
| 58 | protected:
|
---|
| 59 | /**
|
---|
| 60 | @brief the light source this depth shadow map belongs to
|
---|
| 61 | */
|
---|
| 62 | Light* light;
|
---|
| 63 | /**
|
---|
| 64 | @brief pointer to the camera of the lightsource
|
---|
| 65 | */
|
---|
[1120] | 66 | Camera* depthMapCamera;
|
---|
[790] | 67 | /**
|
---|
| 68 | @brief the name of the material to be used when rendering the depth shadow map
|
---|
| 69 | */
|
---|
| 70 | String materialName;
|
---|
| 71 | /**
|
---|
| 72 | @brief a pointer to the OgreSharedRuns this run belongs to
|
---|
| 73 | */
|
---|
| 74 | OgreSharedRuns* sharedRuns;
|
---|
| 75 | /**
|
---|
| 76 | @brief the name of the depth shadow map texture that was created by this run
|
---|
| 77 | */
|
---|
[1120] | 78 | String name;
|
---|
[790] | 79 | /**
|
---|
| 80 | @brief a pointer to the depth shadow texture that was created by this run
|
---|
| 81 | */
|
---|
[1120] | 82 | Texture* depthMapTexture;
|
---|
[790] | 83 |
|
---|
| 84 | //inherited
|
---|
| 85 | void updateFrame(unsigned long frameNum);
|
---|
| 86 | //inherited
|
---|
| 87 | inline void createDepthMap();
|
---|
| 88 | //inherited
|
---|
| 89 | void updateDepthCubeFace(int facenum);
|
---|
| 90 | //inherited
|
---|
| 91 | void updateDepthMap();
|
---|
| 92 |
|
---|
| 93 | };
|
---|