|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.game.state.GameState
com.jmex.game.state.BasicGameState
com.jmex.game.state.StatisticsGameState
public class StatisticsGameState
A GameState which displays some useful statistics like
FPS, avg. Objects/Tris etc.
Note: statistic gathering needs to be activated:
System.setProperty("jme.stats", "set");
| Field Summary |
|---|
| Fields inherited from class com.jmex.game.state.BasicGameState |
|---|
rootNode |
| Fields inherited from class com.jmex.game.state.GameState |
|---|
active, name, parent |
| Constructor Summary | |
|---|---|
StatisticsGameState()
a GameState which displays the statistics graph. |
|
StatisticsGameState(java.lang.String name,
float widthFactor,
float heightFactor,
float alpha,
boolean doLineGraph)
a GameState which displays the statistics graph with the given width, height and alpha. |
|
| Method Summary | |
|---|---|
Quad |
getLabGraph()
|
Quad |
getLineGraph()
|
void |
render(float tpf)
draws the graph. |
void |
setActive(boolean active)
Enable/Disable this GameState and statistics gathering. |
protected void |
setupStatGraphs()
|
protected void |
setupStats()
Set up which stats to graph |
void |
update(float tpf)
updates the statistics graph. |
| Methods inherited from class com.jmex.game.state.BasicGameState |
|---|
cleanup, getRootNode |
| Methods inherited from class com.jmex.game.state.GameState |
|---|
getName, getParent, isActive, setName, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticsGameState()
public StatisticsGameState(java.lang.String name,
float widthFactor,
float heightFactor,
float alpha,
boolean doLineGraph)
name - name of the game statewidth - with of the graphheight - height of the graphalpha - transparency of the graphdoLineGraph - display the lines graph also| Method Detail |
|---|
protected void setupStatGraphs()
protected void setupStats()
public void update(float tpf)
update in class BasicGameStatetpf - The elapsed time since last frame.GameState.update(float)public void render(float tpf)
render in class BasicGameStatetpf - The elapsed time since last frame.GameState.render(float)public void setActive(boolean active)
setActive in class GameStateactive - Whether or not you want this GameState to be updated and rendered.public Quad getLineGraph()
public Quad getLabGraph()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||