org.psychomad.psycholib.j3d.info
Class FPS
java.lang.Object
javax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Leaf
javax.media.j3d.Behavior
org.psychomad.psycholib.j3d.info.FPS
public final class FPS
- extends javax.media.j3d.Behavior
This class implements a 'FPS measurer', that can be easily include in a
java3D sceneGraph.
In order to get this FPS measurer just add it to your 3D graph, then you
will be able to see the FPS on the console and/or using a provided text2D
object directly include in your scene.
Field Summary |
protected static int |
frameRate
|
protected int |
nFrames
|
protected long |
startTime
|
com.sun.j3d.utils.geometry.Text2D |
text2D
|
protected javax.media.j3d.WakeupCondition |
w
|
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary |
FPS()
Default constructor with refresh rate = 200. |
FPS(int nFrames)
Constructor. |
FPS(int nFrames,
javax.media.j3d.Shape3D texto)
Constructor. |
Methods inherited from class javax.media.j3d.Behavior |
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn |
Methods inherited from class javax.media.j3d.Node |
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nFrames
protected int nFrames
startTime
protected long startTime
w
protected final javax.media.j3d.WakeupCondition w
frameRate
protected static int frameRate
text2D
public com.sun.j3d.utils.geometry.Text2D text2D
FPS
public FPS()
- Default constructor with refresh rate = 200.
FPS
public FPS(int nFrames)
- Constructor.
- Parameters:
nFrames
- refresh rate in number of frame
FPS
public FPS(int nFrames,
javax.media.j3d.Shape3D texto)
- Constructor.
- Parameters:
nFrames
- refresh rate in number of frametexto
- a Text2D object that you want to be update to reflect the
current value of the FPS counter.
initialize
public void initialize()
- Specified by:
initialize
in class javax.media.j3d.Behavior
processStimulus
public void processStimulus(java.util.Enumeration criteria)
- Specified by:
processStimulus
in class javax.media.j3d.Behavior
getFrameRate
public static int getFrameRate()
- Get the frame rate.
Copyright 2006 null. All Rights Reserved.