#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderingRun.h" #include "CubeMapRenderingRun.h" #include "OgreSharedRuns.h" /** @brief CubeMapRenderingRun used in an OGRE environment. */ class OgreCubeMapRenderingRun : public OgreRenderingRun, public CubeMapRenderingRun { 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 @param renderSelf sets if the object should be rendered to the cube map @param renderEnvironment sets if the environment should be rendered to the cube map @param selfMaterial the material that should be set for the object while rendering the cubemap @param environmentMaterial the material that should be set for the environment while rendering the cubemap @param getMinMax sets if the minimum and maximum values of the cubemap should be computed */ OgreCubeMapRenderingRun(OgreSharedRuns* sharedRuns, String name, unsigned long startFrame, unsigned long updateInterval, unsigned int resolution, bool useDistCalc, bool useFaceAngleCalc, float distTolerance, float angleTolerance, bool updateAllFace, bool renderSelf, bool renderEnvironment, String selfMaterial, String environmentMaterial, String envTriggerName, bool getMinMax, RenderingRunType cubemapRunType); virtual ~OgreCubeMapRenderingRun(){} /** @brief returns the name of the resulting color cubemap texture */ String getCubeMapTextureName(){return name;} Vector4 getMax(){return max;} Vector4 getMin(){return min;} void freeAllResources(); protected: /** @brief A pointer to the OgreSharedRuns this run belongs to. */ OgreSharedRuns* sharedRuns; /** @brief The name of the cubemap texture that was created by this run. */ String name; /** @brief A pointer to the cubemap texture that was created by this run. */ Texture* cubemapTexture; /** @brief */ String selfMaterial; /** @brief */ bool useSelfMaterial; /** @brief */ String environmentMaterial; /** @brief */ bool useEnvMaterial; RenderingRunType cubemapRunType; Vector4 min; Vector4 max; String envTriggerName; /** @brief */ bool getMinMax; void getCubeMapMinMax(); //inherited inline void createCubeMap(); //inherited inline void updateCubeFace(int facenum); //inherited bool faceNeedsUpdate(int facenum); };