Package jme3utilities.debug
Class PointVisualizer
java.lang.Object
com.jme3.scene.Spatial
com.jme3.scene.Geometry
jme3utilities.debug.PointVisualizer
- All Implemented Interfaces:
com.jme3.anim.util.HasLocalTransform,com.jme3.asset.CloneableSmartAsset,com.jme3.collision.Collidable,com.jme3.export.Savable,com.jme3.util.clone.JmeCloneable,Cloneable
public class PointVisualizer
extends com.jme3.scene.Geometry
Visualize a single location in space.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
com.jme3.scene.Spatial.BatchHint, com.jme3.scene.Spatial.CullHint, com.jme3.scene.Spatial.DFSMode -
Field Summary
FieldsFields inherited from class com.jme3.scene.Geometry
cachedWorldMat, groupNode, ignoreTransform, lodLevel, material, mesh, SAVABLE_VERSION, startIndexFields inherited from class com.jme3.scene.Spatial
batchHint, 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 Summary
ConstructorsModifierConstructorDescriptionprotectedNo-argument constructor needed by SavableClassUtil.PointVisualizer(com.jme3.asset.AssetManager assetManager, int size, com.jme3.math.ColorRGBA color, String shapeName) Instantiate an enabled visualizer with the specified size and color and the named shape. -
Method Summary
Modifier and TypeMethodDescriptioncom.jme3.math.ColorRGBAcopyColor(com.jme3.math.ColorRGBA storeResult) Copy the color.booleanTest whether this visualizer is enabled.voidread(com.jme3.export.JmeImporter im) De-serialize this visualizer, for example when loading from a J3O file.voidsetColor(com.jme3.math.ColorRGBA desiredColor) Alter the color.voidsetDepthTest(boolean enable) Enable or disable the depth test.voidsetEnabled(boolean enable) Enable or disable this visualizer.voidsetShape(com.jme3.texture.Texture desiredTexture) Alter the shape.voidAlter the shape.voidsetSize(int desiredSize) Alter the size.intsize()Read the size.Methods inherited from class com.jme3.scene.Geometry
associateWithGroupNode, breadthFirstTraversal, checkCulling, clone, clone, cloneFields, collideWith, computeWorldMatrix, deepClone, depthFirstTraversal, getFallbackMorphTarget, getLodLevel, getMaterial, getMesh, getModelBound, getMorphState, getMorphState, getNbSimultaneousGPUMorph, getTriangleCount, getVertexCount, getWorldMatrix, isBatched, isDirtyMorph, isGrouped, isIgnoreTransform, oldDeepClone, removeFromParent, setDirtyMorph, setFallbackMorphTarget, setIgnoreTransform, setLodLevel, setMaterial, setMesh, setModelBound, setMorphState, setMorphState, setNbSimultaneousGPUMorph, setParent, unassociateFromGroupNode, updateModelBound, updateWorldBound, updateWorldLightList, updateWorldTransforms, writeMethods inherited from class com.jme3.scene.Spatial
addControl, addControlAt, addLight, addMatParamOverride, breadthFirstTraversal, center, clearMatParamOverrides, 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, jmeClone, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLightListRefresh, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setMatParamOverrideRefresh, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setTransformRefresh, setUserData, toString, updateGeometricState, updateLogicalState, updateMatParamOverrides, worldToLocal
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
PointVisualizer
protected PointVisualizer()No-argument constructor needed by SavableClassUtil. -
PointVisualizer
public PointVisualizer(com.jme3.asset.AssetManager assetManager, int size, com.jme3.math.ColorRGBA color, String shapeName) Instantiate an enabled visualizer with the specified size and color and the named shape.- Parameters:
assetManager- for loading texture assets (not null)size- the desired size (in pixels, >0)color- the desired color (unaffected) or null for the defaultshapeName- the name of a sprite texture (either "cross", "lozenge", "mascle", "pin", "ring", "saltire", "solid circle", or "square", or null for a solid square)
-
-
Method Details
-
copyColor
public com.jme3.math.ColorRGBA copyColor(com.jme3.math.ColorRGBA storeResult) Copy the color.- Parameters:
storeResult- storage for the result (modified if not null)- Returns:
- the color (either
storeResultor a new instance)
-
isEnabled
public boolean isEnabled()Test whether this visualizer is enabled.- Returns:
- true if enabled, otherwise false
-
setColor
public void setColor(com.jme3.math.ColorRGBA desiredColor) Alter the color.- Parameters:
desiredColor- the desired color (not null, unaffected)
-
setDepthTest
public void setDepthTest(boolean enable) Enable or disable the depth test.- Parameters:
enable- true → enable, false → disable (default=false)
-
setEnabled
public void setEnabled(boolean enable) Enable or disable this visualizer.- Parameters:
enable- true → enable, false → disable (default=true)
-
setShape
Alter the shape.- Parameters:
shapeName- the name of a sprite texture (either "cross", "lozenge", "mascle", "ring", "saltire", "solid circle", or "square")
-
setShape
public void setShape(com.jme3.texture.Texture desiredTexture) Alter the shape.- Parameters:
desiredTexture- the desired sprite texture (not null, alias created)
-
setSize
public void setSize(int desiredSize) Alter the size.- Parameters:
desiredSize- the desired size (in pixels, >0)
-
size
public int size()Read the size.- Returns:
- the size (in pixels, >0)
-
read
De-serialize this visualizer, for example when loading from a J3O file.- Specified by:
readin interfacecom.jme3.export.Savable- Overrides:
readin classcom.jme3.scene.Geometry- Parameters:
im- importer (not null)- Throws:
IOException- from superclass
-