com.jme3.app
Class StatsView
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Node
com.jme3.app.StatsView
- All Implemented Interfaces:
- CloneableSmartAsset, Collidable, Savable, Control, java.lang.Cloneable
public class StatsView
- extends Node
- implements Control
The StatsView
provides a heads-up display (HUD) of various
statistics of rendering. The data is retrieved every frame from a
Statistics
and then displayed on screen.
Usage:
To use the stats view, you need to retrieve the
Statistics
from the
Renderer
used by the application. Then, attach
the StatsView
to the scene graph.
Statistics stats = renderer.getStatistics();
StatsView statsView = new StatsView("MyStats", assetManager, stats);
rootNode.attachChild(statsView);
Fields inherited from class com.jme3.scene.Spatial |
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform |
Methods inherited from class com.jme3.scene.Node |
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, write |
Methods inherited from class com.jme3.scene.Spatial |
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setParent, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StatsView
public StatsView(java.lang.String name,
AssetManager manager,
Statistics stats)
update
public void update(float tpf)
- Description copied from interface:
Control
- Updates the control. This should not be called from user code.
- Specified by:
update
in interface Control
- Parameters:
tpf
- Time per frame.
cloneForSpatial
public Control cloneForSpatial(Spatial spatial)
- Description copied from interface:
Control
- Creates a clone of the Control, the given Spatial is the cloned
version of the spatial to which this control is attached to.
- Specified by:
cloneForSpatial
in interface Control
- Returns:
- A clone of this control for the spatial
setSpatial
public void setSpatial(Spatial spatial)
- Specified by:
setSpatial
in interface Control
- Parameters:
spatial
- the spatial to be controlled. This should not be called
from user code.
setEnabled
public void setEnabled(boolean enabled)
isEnabled
public boolean isEnabled()
render
public void render(RenderManager rm,
ViewPort vp)
- Description copied from interface:
Control
- Should be called prior to queuing the spatial by the RenderManager. This
should not be called from user code.
- Specified by:
render
in interface Control