Package jme3utilities

Class DecalManager

java.lang.Object
jme3utilities.DecalManager

public class DecalManager extends Object
Manage decal geometries, "aging them out" on a first-in, first-out (FIFO) basis.
  • Field Summary

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

    Constructors
    Constructor
    Description
    A no-arg constructor to avoid javadoc warnings from JDK 18.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCloneOf(com.jme3.scene.Geometry active)
    Add a decal based on the specified template.
    void
    addDecal(com.jme3.scene.Geometry decal)
    Add the specified decal to the queue.
    int
    Return the maximum number of decal triangles to retain.
    com.jme3.scene.Node
    Access the scene-graph node which parents all the decals.
    void
    Remove just enough of the old decals to conform to the triangle limit.
    void
    Remove all decals.
    void
    setMaxTriangles(int newLimit)
    Alter the maximum number of decal triangles to retain.
    void
    translateAll(com.jme3.math.Vector3f offset)
    Translate all decals by the specified offset.

    Methods inherited from class java.lang.Object

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

    • logger

      public static final Logger logger
      message logger for this class
  • Constructor Details

    • DecalManager

      public DecalManager()
      A no-arg constructor to avoid javadoc warnings from JDK 18.
  • Method Details

    • addCloneOf

      public void addCloneOf(com.jme3.scene.Geometry active)
      Add a decal based on the specified template.
      Parameters:
      active - the template (not null, not empty, unaffected)
    • addDecal

      public void addDecal(com.jme3.scene.Geometry decal)
      Add the specified decal to the queue.
      Parameters:
      decal - the decal to add (not null, not empty, alias created)
    • getMaxTriangles

      public int getMaxTriangles()
      Return the maximum number of decal triangles to retain.
      Returns:
      the limit value (>0)
    • getNode

      public com.jme3.scene.Node getNode()
      Access the scene-graph node which parents all the decals.
      Returns:
      the pre-existing instance (not null)
    • purge

      public void purge()
      Remove just enough of the old decals to conform to the triangle limit.
    • removeAll

      public void removeAll()
      Remove all decals.
    • setMaxTriangles

      public void setMaxTriangles(int newLimit)
      Alter the maximum number of decal triangles to retain.
      Parameters:
      newLimit - the desired limit value (>0, default=9999)
    • translateAll

      public void translateAll(com.jme3.math.Vector3f offset)
      Translate all decals by the specified offset.
      Parameters:
      offset - the desired offset (in world coordinates, not null, finite, unaffected)