My Project
Tick.h
1 #pragma once
2 namespace ParaEngine
3 {
5  class Tick
6  {
7  public:
8  Tick();
9  Tick(float fInterval);
10  void SetFPS(float fFPS);
11 
12  /* in seconds */
13  void SetInterval(float fInterval);
14  /* in seconds */
15  float GetInverval() const;
16 
17  /* check to see if we should tick. For example, some function may be called with deltaTime in 30fps,
18  however, we only want to process at 20FPS, such as physics, we can use this function is easily limit function calling rate.
19  @param deltaTime: delta time in seconds, since last call
20  */
21  bool IsTick(float deltaTime);
22  protected:
23  float m_fElapsedTime;
24  float m_invervalSeconds;
25  };
26 }
different physics engine has different winding order.
Definition: EventBinding.h:32
Check to see if it is a tick.
Definition: Tick.h:5