//**************************************************************************/ // Copyright (c) 2009 Autodesk, Inc. // All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // //**************************************************************************/ // DESCRIPTION: // CREATED: August 2009 //**************************************************************************/ #if defined(JAMBUILD) #include <Mudbox/mudbox.h> #else #include "../../include/Mudbox/mudbox.h" #endif // We are using the mudbox namespace. using namespace mudbox; class CounterNode : public Node { public: CounterNode(); // constructor void OnEvent( const EventGate &cEvent ); // this will get called for each frame event aevent m_eEachFrame; // this event-gate gets attached to Mudbox's per-frame event int m_iNumberOfFrames; // keep track of how many frames were rendered }; class FrameCounter { Q_DECLARE_TR_FUNCTIONS(FrameCounter); public: static void Initializer(); static void StartCounting(); // starts counting frames static void StopCounting(); // stops counting frames and reports the result static CounterNode* s_pCounter; // a pointer to the object that is counting frames };