jjdh API

jjdh.opengl.core.counter
Class AbstractFrameCounter

java.lang.Object
  extended by 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
           
 
Constructor Summary
AbstractFrameCounter()
           
 
Method Summary
abstract  void addOneFrame()
          Notifies this counter that another frame was drawn.
 String detailedToString()
           
 int getFrames()
           
 float getFramesPerSecond()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frames

protected int frames

fps

protected float fps
Constructor Detail

AbstractFrameCounter

public AbstractFrameCounter()
Method Detail

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

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.