TuttleOFX
1
|
00001 #include "NoProgress.hpp" 00002 00003 namespace tuttle { 00004 namespace plugin { 00005 00006 /** 00007 * @brief Start the algorithm progress bar. 00008 * 00009 * @param[in] numSteps number of steps 00010 * 00011 */ 00012 void NoProgress::progressBegin( const int numSteps, const std::string& msg ) 00013 { 00014 _counter = 0.0; 00015 _stepSize = 1.0 / static_cast<double>( numSteps ); 00016 } 00017 00018 /** 00019 * @brief Put the progress bar forward. 00020 * 00021 * @param[in] nSteps Number of steps processed since last call. 00022 * 00023 * @return true = effect aborted, 00024 * false = continu rendering 00025 * 00026 */ 00027 bool NoProgress::progressForward( const int nSteps ) 00028 { 00029 _counter += _stepSize * static_cast<double>( nSteps ); 00030 return false; 00031 } 00032 00033 /** 00034 * @brief Ends the algorithm progress bar. 00035 * 00036 */ 00037 void NoProgress::progressEnd() 00038 { 00039 } 00040 00041 } 00042 } 00043 00044