public class StatsView extends Node implements Control, JmeCloneable
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.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);
Spatial.BatchHint, Spatial.CullHint, Spatial.DFSModebatchHint, controls, cullHint, frustrumIntersects, key, localLights, localOverrides, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_CHILD_LIGHTLIST, RF_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform| Constructor and Description |
|---|
StatsView(java.lang.String name,
AssetManager manager,
Statistics stats) |
| Modifier and Type | Method and Description |
|---|---|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Called internally by com.jme3.util.clone.Cloner.
|
Control |
cloneForSpatial(Spatial spatial)
Deprecated.
|
float |
getHeight() |
boolean |
isEnabled() |
StatsView |
jmeClone()
Called internally by com.jme3.util.clone.Cloner.
|
void |
render(RenderManager rm,
ViewPort vp)
Should be called prior to queuing the spatial by the RenderManager.
|
void |
setEnabled(boolean enabled) |
void |
setSpatial(Spatial spatial) |
void |
update(float tpf)
Updates the control.
|
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, read, setLightListRefresh, setLodLevel, setMaterial, setMatParamOverrideRefresh, setModelBound, setParent, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, writeaddControl, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, depthFirstTraversal, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalMatParamOverrides, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldMatParamOverrides, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeFromParent, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setUserData, toString, updateMatParamOverrides, updateWorldLightList, updateWorldTransforms, worldToLocalpublic StatsView(java.lang.String name,
AssetManager manager,
Statistics stats)
public float getHeight()
public void update(float tpf)
Control@Deprecated public Control cloneForSpatial(Spatial spatial)
ControlcloneForSpatial in interface Controlpublic StatsView jmeClone()
SpatialjmeClone in interface JmeCloneablejmeClone in class Spatialpublic void cloneFields(Cloner cloner, java.lang.Object original)
NodecloneFields in interface JmeCloneablecloneFields in class Nodecloner - The cloner that is performing the cloning operation. The
cloneFields method can call back into the cloner to make
clones of its subordinate fields.original - The original object from which this object was cloned.
This is provided for the very rare case that this object needs
to refer to its original for some reason. In general, all of
the relevant values should have been transferred during the
shallow clone and this object need merely clone what it wants.public void setSpatial(Spatial spatial)
setSpatial in interface Controlspatial - the spatial to be controlled. This should not be called
from user code.public void setEnabled(boolean enabled)
public boolean isEnabled()
public void render(RenderManager rm, ViewPort vp)
Control