#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderingRun.h" #include "ChildPSystemRenderingRun.h" #include "OgreSharedRuns.h" /** @brief ChildPsystemRenderingRun used in an OGRE environment. */ class OgreChildPSystemRenderingRun : public OgreRenderingRun, public ChildPsystemRenderingRun { public: /** @brief Constructor. @param sharedRuns a pointer to the OgreSharedRuns this run belongs to @param name the name of the 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 resolution of the impostor texture @param perspectiveRendering sets if the impostor should be rendered with a perspective projection or orthogonal @param childPSysScriptName the name of the particle system script @param useOwnMaterial use the material that was defined in the particle script @param materialName use this specific material while rendering the impostor */ OgreChildPSystemRenderingRun(OgreSharedRuns* sharedRuns, String name, unsigned long startFrame, unsigned long updateInterval, unsigned int resolution, bool perspectiveRendering, String childParticleSystemName, String particleScriptName, bool useOwnMaterial, String materialName ); virtual ~OgreChildPSystemRenderingRun(){} /** @brief returns the name of the resulting photon hit map */ String getImpostorTextureName(){return name;} //inherited bool canJoin(RenderingRun* run) { return false; } void setNode(SceneNode* n){psysNode = n;} /** @brief Returns the radius of the small particle system. */ Real getSmallSysRadius(){return sysRad;} void freeAllResources(); protected: SceneNode* psysNode; /** @brief Sets if the impostor should be rendered with a perspective projection or orthogonal. */ bool perspectiveRendering; /** @brief Use the material that was defined in the particle script. */ bool useOwnMaterial; /** @brief Use this specific material while rendering the impostor. */ String materialName; /** @brief The name of the small particle system. */ String childParticleSystemName; /** @brief The name of the small particle system script. */ String particleScriptName; /** @brief Radius of the small particle system. */ Real sysRad; /** @brief Camera used while rendering the impostor image. */ Camera* impostorCamera; /** @brief A pointer to the OgreSharedRuns this run belongs to. */ OgreSharedRuns* sharedRuns; /** @brief The name of the imostor texture that was created by this run. */ String name; /** @brief A pointer to the impostor texture that was created by this run. */ Texture* impostorTexture; //inherited void updateFrame(unsigned long frameNum); //inherited inline void createImpostorTexture(); };