3 /////////////////////////////////////////////////////////////////////////////
5 // Copyright (c) 2002 David Ward
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef __FrameRate_h__
10 #define __FrameRate_h__
13 #include "../Common/Common.h"
14 #include "SettingsStore.h"
15 #include "DasherModel.h"
21 /// keeps the framerate (LP_FRAMERATE / 100.0) up-to-date,
22 /// computes the Steps parameter,
23 /// computes RXmax - which controls the maximum rate of zooming in
24 class CFrameRate
: public CSettingsUserObserver
{
26 CFrameRate(CSettingsUser
*pCreator
);
28 //Responds to a change to LP_FRAMERATE or LP_MAX_BITRATE
29 // by recomputing the Steps() parameter.
30 virtual void HandleEvent(int iParameter
);
32 ///The number of frames, in which we will attempt to bring
33 /// the target location (under the cursor, or in dynamic button
34 /// modes) to the crosshair. See DJW thesis.
40 /// Reset the framerate class
41 /// TODO: Need to check semantics here
42 /// Called from CDasherInterfaceBase::UnPause;
44 void Reset_framerate(unsigned long Time
) {
49 void RecordFrame(unsigned long Time
);
52 ///number of frames that have been sampled
54 ///time at which first sampled frame was rendered
55 unsigned long m_iTime
;
56 ///number of frames over which we will compute average framerate
65 #endif /* #ifndef __FrameRate_h__ */