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

    Fields
    Modifier and Type
    Field
    Description
    static final Logger
    message logger for this class

    Fields inherited from class com.jme3.scene.Geometry

    cachedWorldMat, groupNode, ignoreTransform, lodLevel, material, mesh, SAVABLE_VERSION, startIndex

    Fields 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    No-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 Type
    Method
    Description
    com.jme3.math.ColorRGBA
    copyColor(com.jme3.math.ColorRGBA storeResult)
    Copy the color.
    boolean
    Test whether this visualizer is enabled.
    void
    read(com.jme3.export.JmeImporter im)
    De-serialize this visualizer, for example when loading from a J3O file.
    void
    setColor(com.jme3.math.ColorRGBA desiredColor)
    Alter the color.
    void
    setDepthTest(boolean enable)
    Enable or disable the depth test.
    void
    setEnabled(boolean enable)
    Enable or disable this visualizer.
    void
    setShape(com.jme3.texture.Texture desiredTexture)
    Alter the shape.
    void
    setShape(String shapeName)
    Alter the shape.
    void
    setSize(int desiredSize)
    Alter the size.
    int
    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, write

    Methods 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

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • logger

      public static final Logger 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 default
      shapeName - 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 storeResult or 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

      public void setShape(String shapeName)
      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

      public void read(com.jme3.export.JmeImporter im) throws IOException
      De-serialize this visualizer, for example when loading from a J3O file.
      Specified by:
      read in interface com.jme3.export.Savable
      Overrides:
      read in class com.jme3.scene.Geometry
      Parameters:
      im - importer (not null)
      Throws:
      IOException - from superclass