MeVisLabToolboxReference
|
00001 #ifndef __SoShowFPS_H 00002 #define __SoShowFPS_H 00003 //---------------------------------------------------------------------------------- 00004 // **InsertLicense** code 00005 //---------------------------------------------------------------------------------- 00007 00012 //---------------------------------------------------------------------------------- 00013 00014 #include "SoUtilsSystem.h" 00015 #include "mlTimeCounter.h" 00016 #include <Inventor/fields/SoSFInt32.h> 00017 00018 //============================================================= 00020 //============================================================= 00021 class SOUTILS_EXPORT SoShowFPS : public SoNode { 00022 00023 SO_NODE_HEADER(SoShowFPS); 00024 00025 public: 00026 // Constructor 00027 SoShowFPS(); 00028 00030 static void initClass(); 00031 00033 virtual void GLRender(SoGLRenderAction *action); 00034 00035 00036 SoSFInt32 numAverageFrames; 00037 00038 protected: 00039 virtual ~SoShowFPS(); 00040 00041 private: 00042 ml::TimeCounter _timer; 00043 std::vector<float> _recentTimeSpent; 00044 }; 00045 00046 #endif