#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderingRun.h" #include "DepthShadowMapRenderingRun.h" #include "OgreSharedRuns.h" #include "OgreFocusingMapRenderingRun.h" /** @brief ColorCubeMapRenderingRun used in an OGRE environment. */ class OgreDepthShadowMapRenderingRun : public OgreRenderingRun, public DepthShadowMapRenderingRun { public: /** @brief Constructor. @param sharedRuns a pointer to the OgreSharedRuns this run belongs to @param name the name of the depth map texture to be created @param light the light source this depth shadow map belongs to @param resolutionX the resolution width of the depth shadow map @param resolutionY the resolution height of the depth shadow map @param materialName the name of the material to be used when rendering the depth shadow map */ OgreDepthShadowMapRenderingRun(OgreSharedRuns* sharedRuns, String name, Light* light, unsigned int resolutionX, unsigned int resolutionY, String materialName); /** @brief returns the depth shadow map texture created by this run */ const String& getDepthMapTextureName(); /** @brief Refreshes light camera matrices, called in each update. */ void refreshLight(unsigned long frameNum); /** @brief retuns the view matrix of the camera from which the depth shadow map was created */ Matrix4 getLightViewMatrix(); /** @brief retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created */ Matrix4 getLightViewProjMatrix(); Real getLightFarPlane(){return lightFarPlane;} protected: /** @brief the light source this depth shadow map belongs to */ Light* light; /** @brief pointer to the camera of the lightsource */ Camera* depthMapCamera; /** @brief the name of the material to be used when rendering the depth shadow map */ String materialName; /** @brief a pointer to the OgreSharedRuns this run belongs to */ OgreSharedRuns* sharedRuns; /** @brief the name of the depth shadow map texture that was created by this run */ String name; String blurredname; /** @brief a pointer to the depth shadow texture that was created by this run */ Texture* depthMapTexture; Texture* blurredDepthMapTexture; Real lightFarPlane; //inherited void updateFrame(unsigned long frameNum); //inherited inline void createDepthMap(); //inherited void updateDepthCubeFace(int facenum); //inherited void updateDepthMap(); };