#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderingRun.h" #include "ReducedCubeMapRenderingRun.h" #include "OgreSharedRuns.h" /** @brief ReducedCubeMapRenderingRun used in an OGRE environment. */ class OgreReducedCubeMapRenderingRun : public OgreRenderingRun, public ReducedCubeMapRenderingRun { public: /** @brief Constructor. @param sharedRuns a pointer to the OgreSharedRuns this run belongs to @param name the name of the cubemap texture to be created @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames @param updateInterval update frequency @param resolution cubemap resolution @param useDistCalc flag to skip cube face update if object is far away @param useFaceAngleCalc flag to skip cube face update if face is neglible @param distTolerance distance tolerance used in face skip @param angleTolerance angle tolerance used in face skip @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame */ OgreReducedCubeMapRenderingRun(OgreSharedRuns* sharedRuns, String name, unsigned long startFrame, unsigned long updateInterval, unsigned int resolution, bool useDistCalc = false, bool useFaceAngleCalc = false, float distTolerance = 15, float angleTolerance = 10, bool updateAllFace = false); virtual ~OgreReducedCubeMapRenderingRun(){} /** @brief returns the name of the resulting downsampled color cubemap texture */ String& getReducedCubeMapTextureName(){return name;} //inherited void colorCubeMapChanged(String& newMapName); void freeAllResources(); protected: /** @brief a pointer to the OgreSharedRuns this run belongs to */ OgreSharedRuns* sharedRuns; /** @brief the name of the downsampled cubemap texture that was created by this run */ String name; /** @brief a pointer to the downsampled cubemap texture that was created by this run */ Texture* reducedCubemapTexture; //inherited inline void createReducedCubeMap(); //inherited inline void updateCubeFace(int facenum); //inherited bool faceNeedsUpdate(int facenum); };