#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderingRun.h" #include "OgreSharedRuns.h" /** @brief Weight computing rendering run. This run is used in the pathmap technique. It creates a texture for a light source that stores the weights that should be used for each cluster of entry points. */ class OgrePMWeightComputeRenderingRun : public OgreRenderingRun { public: /** @brief Constructor. @param name the name of the weight texture to be created @param LightName the name of the light source to use */ OgrePMWeightComputeRenderingRun(String name, String LightName); /** @brief returns the name of the weight texture */ String getPMWeightTetureName(){return weightTexture->getName();} //not used float* getWeights(){return weights;} protected: /** @brief light view-projection matrix */ Matrix4 lightMatrix; /** @brief light view matrix */ Matrix4 lightViewMatrix; /** @brief the name of the weight texture that was created by this run */ String name; /** @brief a pointer to the weight texture that was created by this run */ Texture* weightTexture; /** @brief A pointer to a texture that stores weights for all the entry point. This texture will be used to determine the weights of the clusters. */ Texture* allWeightsTexture; /** @brief A pointer to the light source. */ Light* light; //not used float* weights; //inherited void updateFrame(unsigned long frameNum); /** @brief Creates the weight texture. It also creates the texture storing all weights. @see allWeightsTexture */ inline void createWeightMap(); };