#pragma once #include "RenderTechnique.h" /** @brief Base abstract class of rendering a color cube map. This technique defines that the final rendering of an object needs a cubmap of the colors of the surrounding environment. */ class CubeMapRenderTechnique : virtual public RenderTechnique { public: /** @brief Constructor. @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames @param cubeMapUpdateInterval update frequency @param cubeMapResolution color 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 parentRenderable the object to operate on @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to */ CubeMapRenderTechnique( unsigned long startFrame, unsigned long cubeMapUpdateInterval, unsigned int cubeMapResolution, bool useDistCalc, bool useFaceAngleCalc, float distTolerance, float angleTolerance, bool updateAllFace, bool renderSelf, ElementaryRenderable* parentRenderable, TechniqueGroup* parentTechniqueGroup ); ~CubeMapRenderTechnique(); protected: /** @brief a flag to skip cube face update if object is far away or too small. @see distTolerance */ bool useDistCalc; /** @brief a flag to skip cube face update the face is neglible. @see angleTolerance */ bool useFaceAngleCalc; /** @brief A value used in face skip test. The higher this value gets the more precise, but slower the method will be. */ float distTolerance; /** @brief A value used in face skip test. The higher this value gets the more precise, but slower the method will be. */ float angleTolerance; /** @brief defines if all cubemap faces should be updated in a frame or only one face per frame */ bool updateAllFace; /** @brief color-cubemap update frequency */ unsigned long cubeMapUpdateInterval; /** @brief color-cubemap resolution */ unsigned int cubeMapResolution; /** @brief offset in frame number used during update */ unsigned long startFrame; bool renderSelf; };