#pragma once #include "RenderTechnique.h" /** @brief Base abstract class __declspec( dllexport ) of the illumination manager. The illumination manager is responsible for refreshing rendering techniques connected to visible renderables. It also has the resposibility to manage shared runs, to join and split them if needed. */ class __declspec( dllexport ) IlluminationManager { protected: public: /** @brief The function to be called to render one frame. This is the main refreshing function. It seasrches for visible objects, manages shared runs and updates render techniques. It should be called after all animations are done and before rendering to the frame buffer. @param frameNumber current framenumber */ virtual void update(unsigned long frameNumber) = 0; /** @brief The function to be called when a shared run is splitted. @param old pointer to the SharedRuns instance that is split @param new1 pointer to one of the SharedRuns instance that remain after split @param new2 pointer to the other SharedRuns instance that remain after split */ virtual void sharedRunSplit(SharedRuns* old, SharedRuns* new1, SharedRuns* new2){}; /** @brief The function to be called when two shared runs are joined. @param old1 pointer to one of the SharedRuns instance that are joined @param old2 pointer to the other SharedRuns instance that are joined @param newsr pointer to the resulting parent SharedRuns instance */ virtual void sharedRunJoin(SharedRuns* old1, SharedRuns* old2, SharedRuns* newsr){}; /** @brief Joins shared runs if needed. Searches the registered shared run roots and join them if necessary (they are close enough). */ virtual void joinSharedRuns(){}; /** @brief Register a shared run object. Only called when new techniques are created. @param runs pointer to the SharedRuns instance to add */ virtual void addSharedRuns(SharedRuns* runs){}; };