#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 DepthShadowMapRenderingRun 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); virtual ~OgreDepthShadowMapRenderingRun(){} /** @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(); /** @brief Retuns the far plane of the light projection. */ Real getLightFarPlane(){return lightFarPlane;} void freeAllResources(); bool renderableQueued (Renderable *rend, uint8 groupID, ushort priority, Technique **ppTech); 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; /** @brief The name of the blurred depth shadow map texture that was created by this run. */ String blurredname; /** @brief A pointer to the depth shadow texture that was created by this run. */ Texture* depthMapTexture; /** @brief A pointer to the blurred depth shadow texture that was created by this run. */ Texture* blurredDepthMapTexture; Real lightFarPlane; String triggerName; //inherited void updateFrame(unsigned long frameNum); //inherited inline void createDepthMap(); //inherited void updateDepthCubeFace(int facenum); //inherited void updateDepthMap(); };