com.cult3d.world
Class ParticleSystem

java.lang.Object
  |
  +--com.cult3d.world.Node
        |
        +--com.cult3d.world.ParticleSystem

public final class ParticleSystem
extends Node

This class provides a Java representation for a Particle System that exists in the scene graph of the Cult3D Designer.

Since:
Cult3D 5.3

Fields inherited from class com.cult3d.world.Node
LOCAL, WORLD, X, Y, Z
 
Constructor Summary
ParticleSystem(java.lang.String name)
          Constructs a Java representation of an existing particle system in the scene graph.
 
Method Summary
 java.lang.String getInfo()
           Returns a string representation of the values of this object.
 Texture getTexture()
          Method that retrieves the texture map for a particle system.
 boolean isActive()
          Method that retrieves the current state of the particle system.
 void kill()
          Method the removes all particles, this method does not stop the generation of new particles, use setActive(false) to stop generating more particles.
 void setActive(boolean active)
          Method that activates or deactivates the particle system.
 void setTexture(Texture tex)
          Method that sets the texture map for a particle system.
 java.lang.String toString()
           Returns a string representation of the values of this object.
 
Methods inherited from class com.cult3d.world.Node
addChild, addChildToRoot, disconnect, equals, getChildAt, getChildCount, getFirstChild, getFirstNode, getName, getNextSibling, getOrientation, getParent, getPosition, getTransform, isBoundingBoxVisible, isVisible, nodeToWorld, rotate, rotate, rotate, rotate, rotateDegrees, rotateDegrees, rotateDegrees, rotateDegrees, setBoundingBoxVisible, setName, setOrientation, setPosition, setTransform, setVisible, setVisible, stopRotation, stopTranslation, translate, translate, translate, translate, worldToNode
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParticleSystem

public ParticleSystem(java.lang.String name)
Constructs a Java representation of an existing particle system in the scene graph. The uniqe name of the particle system, as defined in the Cult3D Designer, is given as parameter. Make sure that the spelling of the name is exactly as in the Designer, including any captial letters.
Parameters:
name - The name of the particle system.
Throws:
NameNotFoundException - if a particle system with the given name can't be found.
Since:
Cult3D 5.3
Method Detail

setActive

public void setActive(boolean active)
Method that activates or deactivates the particle system. Set to true to start emitting particle, set to false to stop emitting particles
Parameters:
active - The state the particle system will change to
Since:
Cult3D 5.3

isActive

public boolean isActive()
Method that retrieves the current state of the particle system.
Returns:
The current state of the particle system, true means active
Since:
Cult3D 5.3

kill

public void kill()
Method the removes all particles, this method does not stop the generation of new particles, use setActive(false) to stop generating more particles.
Since:
Cult3D 5.3

getTexture

public Texture getTexture()
Method that retrieves the texture map for a particle system.
Returns:
The current texture map for a particle system.
Since:
Cult3D 5.3

setTexture

public void setTexture(Texture tex)
Method that sets the texture map for a particle system. Make the texture map as small as possible or it will make a tremendous impact on the performance!
Parameters:
Texture - to use
Since:
Cult3D 5.3

getInfo

public java.lang.String getInfo()

Returns a string representation of the values of this object.

This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

Overrides:
getInfo in class Node
Returns:
A string representing this object.
Since:
Cult3D 5.3

toString

public java.lang.String toString()

Returns a string representation of the values of this object.

The string contains the name of the Particle system

This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

Overrides:
toString in class Node
Returns:
A string representing this object.
Since:
Cult3D 5.3