Package jme3utilities
Class DecalManager
java.lang.Object
jme3utilities.DecalManager
Manage decal geometries, "aging them out" on a first-in, first-out (FIFO)
basis.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloneOf(com.jme3.scene.Geometry active) Add a decal based on the specified template.voidaddDecal(com.jme3.scene.Geometry decal) Add the specified decal to the queue.intReturn the maximum number of decal triangles to retain.com.jme3.scene.NodegetNode()Access the scene-graph node which parents all the decals.voidpurge()Remove just enough of the old decals to conform to the triangle limit.voidRemove all decals.voidsetMaxTriangles(int newLimit) Alter the maximum number of decal triangles to retain.voidtranslateAll(com.jme3.math.Vector3f offset) Translate all decals by the specified offset.
-
Field Details
-
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)
-