jjdh.opengl.core.counter
Class AbstractFrameCounter
java.lang.Object
jjdh.opengl.core.counter.AbstractFrameCounter
- All Implemented Interfaces:
- FrameCounter
- Direct Known Subclasses:
- FixedFrameCounter, FixedTimeCounter
public abstract class AbstractFrameCounter
- extends Object
- implements FrameCounter
Field Summary |
protected float |
fps
|
protected int |
frames
|
frames
protected int frames
fps
protected float fps
AbstractFrameCounter
public AbstractFrameCounter()
addOneFrame
public abstract void addOneFrame()
- Description copied from interface:
FrameCounter
- Notifies this counter that another frame was drawn.
- Specified by:
addOneFrame
in interface FrameCounter
getFrames
public int getFrames()
- Specified by:
getFrames
in interface FrameCounter
- Returns:
- the number of frames on which the calculation of the current
frame rate is based
getFramesPerSecond
public float getFramesPerSecond()
- Specified by:
getFramesPerSecond
in interface FrameCounter
- Returns:
- the current frame rate
toString
public String toString()
- Specified by:
toString
in interface FrameCounter
- Overrides:
toString
in class Object
- Returns:
- a short textual description of the current frame rate
detailedToString
public String detailedToString()
- Specified by:
detailedToString
in interface FrameCounter
- Returns:
- a detailed textual description of the current frame rate
Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.