com.jme3.effect
クラス ParticleEmitter

java.lang.Object
  上位を拡張 com.jme3.scene.Spatial
      上位を拡張 com.jme3.scene.Geometry
          上位を拡張 com.jme3.effect.ParticleEmitter
すべての実装されたインタフェース:
Asset, Collidable, Savable, java.lang.Cloneable

public class ParticleEmitter
extends Geometry

ParticleEmitter is a special kind of geometry which simulates a particle system.

Particle emitters can be used to simulate various kinds of phenomena, such as fire, smoke, explosions and much more.

Particle emitters have many properties which are used to control the simulation. The interpretation of these properties depends on the ParticleInfluencer that has been assigned to the emitter via setParticleInfluencer(com.jme3.effect.influencers.ParticleInfluencer). By default the implementation DefaultParticleInfluencer is used.


入れ子のクラスの概要
static class ParticleEmitter.ParticleEmitterControl
           
 
クラス com.jme3.scene.Spatial から継承された入れ子のクラス/インタフェース
Spatial.CullHint
 
フィールドの概要
 
クラス com.jme3.scene.Spatial から継承されたフィールド
queueDistance
 
コンストラクタの概要
ParticleEmitter()
          For serialization only.
ParticleEmitter(java.lang.String name, ParticleMesh.Type type, int numParticles)
           
 
メソッドの概要
 ParticleEmitter clone()
          This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry.
 ParticleEmitter clone(boolean cloneMaterial)
          This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry.
 void emitAllParticles()
          Instantly emits all the particles possible to be emitted.
 ColorRGBA getEndColor()
          Get the end color of the particles spawned.
 float getEndSize()
          Get the end size of the particles spawned.
 Vector3f getFaceNormal()
          Get the normal which particles are facing.
 Vector3f getGravity()
          Get the gravity vector.
 float getHighLife()
          Get the high value of life.
 int getImagesX()
          Get the number of images along the X axis (width).
 int getImagesY()
          Get the number of images along the Y axis (height).
 Vector3f getInitialVelocity()
          推奨されていません。 Use ParticleEmitter.getParticleInfluencer().getInitialVelocity() instead.
 float getLowLife()
          Get the low value of life.
 int getMaxNumParticles()
           
 ParticleMesh.Type getMeshType()
          Returns the mesh type used by the particle emitter.
 int getNumVisibleParticles()
          Returns the number of visible particles (spawned but not dead).
 ParticleInfluencer getParticleInfluencer()
          Returns the ParticleInfluencer that influences this particle emitter.
 Particle[] getParticles()
          Returns a list of all particles (shouldn't be used in most cases).
 float getParticlesPerSec()
          Get the number of particles to spawn per second.
 float getRotateSpeed()
          Returns the rotation speed in radians/sec for particles.
 EmitterShape getShape()
           
 ColorRGBA getStartColor()
          Get the start color of the particles spawned.
 float getStartSize()
          Get the start color of the particles spawned.
 float getVelocityVariation()
          推奨されていません。 This method is deprecated. Use ParticleEmitter.getParticleInfluencer().getVelocityVariation(); instead.
 boolean isEnabled()
          Check if a particle emitter is enabled for update.
 boolean isFacingVelocity()
          Check if particles spawned should face their velocity.
 boolean isInWorldSpace()
          Returns true if particles should spawn in world space.
 boolean isRandomAngle()
          Returns true if every particle spawned should have a random facing angle.
 boolean isSelectRandomImage()
          Returns true if every particle spawned should get a random image.
 void killAllParticles()
          Instantly kills all active particles, after this method is called, all particles will be dead and no longer visible.
 void preload(RenderManager rm, ViewPort vp)
           
 void read(JmeImporter im)
           
 void setEnabled(boolean enabled)
          Set to enable or disable the particle emitter When a particle is disabled, it will be "frozen in time" and not update.
 void setEndColor(ColorRGBA endColor)
          Set the end color of the particles spawned.
 void setEndSize(float endSize)
          Set the end size of the particles spawned.
 void setFaceNormal(Vector3f faceNormal)
          Sets the normal which particles are facing.
 void setFacingVelocity(boolean followVelocity)
          Set to true if particles spawned should face their velocity (or direction to which they are moving towards).
 void setGravity(float gravity)
          推奨されていません。 Use {@link ParticleEmitter#setGravity(float, float, float) instead.
 void setGravity(float x, float y, float z)
          Sets the gravity vector.
 void setGravity(Vector3f gravity)
          This method sets the gravity vector.
 void setHighLife(float highLife)
          Set the high value of life.
 void setImagesX(int imagesX)
          Set the number of images along the X axis (width).
 void setImagesY(int imagesY)
          Set the number of images along the Y axis (height).
 void setInitialVelocity(Vector3f initialVelocity)
          推奨されていません。 This method is deprecated. Use ParticleEmitter.getParticleInfluencer().setInitialVelocity(initialVelocity); instead.
 void setInWorldSpace(boolean worldSpace)
          Set to true if particles should spawn in world space.
 void setLowLife(float lowLife)
          Set the low value of life.
 void setMeshType(ParticleMesh.Type meshType)
          Sets the type of mesh used by the particle emitter.
 void setNumParticles(int numParticles)
          Set the maximum amount of particles that can exist at the same time with this emitter.
 void setParticleInfluencer(ParticleInfluencer particleInfluencer)
          Set the ParticleInfluencer to influence this particle emitter.
 void setParticlesPerSec(float particlesPerSec)
          Set the number of particles to spawn per second.
 void setRandomAngle(boolean randomAngle)
          Set to true if every particle spawned should have a random facing angle.
 void setRotateSpeed(float rotateSpeed)
          Set the rotation speed in radians/sec for particles spawned after the invocation of this method.
 void setSelectRandomImage(boolean selectRandomImage)
          Set to true if every particle spawned should get a random image from a pool of images constructed from the texture, with X by Y possible images.
 void setShape(EmitterShape shape)
           
 void setStartColor(ColorRGBA startColor)
          Set the start color of the particles spawned.
 void setStartSize(float startSize)
          Set the start size of the particles spawned.
 void setVelocityVariation(float variation)
          推奨されていません。 This method is deprecated. Use ParticleEmitter.getParticleInfluencer().setVelocityVariation(variation); instead.
 void updateFromControl(float tpf)
          Callback from Control.update(), do not use.
 void write(JmeExporter ex)
           
 
クラス com.jme3.scene.Geometry から継承されたメソッド
collideWith, computeWorldMatrix, deepClone, depthFirstTraversal, getLodLevel, getMaterial, getMesh, getModelBound, getTriangleCount, getVertexCount, getWorldMatrix, isIgnoreTransform, setIgnoreTransform, setLodLevel, setMaterial, setMesh, setModelBound, updateModelBound
 
クラス com.jme3.scene.Spatial から継承されたメソッド
addControl, addLight, breadthFirstTraversal, center, checkCulling, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, toString, updateGeometricState, updateLogicalState, worldToLocal
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

ParticleEmitter

public ParticleEmitter(java.lang.String name,
                       ParticleMesh.Type type,
                       int numParticles)

ParticleEmitter

public ParticleEmitter()
For serialization only. Do not use.

メソッドの詳細

clone

public ParticleEmitter clone()
クラス Geometry の記述:
This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry. Exception: if the mesh is marked as being a software animated mesh, (bind pose is set) then the positions and normals are deep copied.

オーバーライド:
クラス Geometry 内の clone
戻り値:
A clone of this Spatial, the scene graph in its entirety is cloned and can be altered independently of the original scene graph. Note that meshes of geometries are not cloned explicitly, they are shared if static, or specially cloned if animated. All controls will be cloned using the Control.cloneForSpatial method on the clone.
関連項目:
Mesh.cloneForAnim()

clone

public ParticleEmitter clone(boolean cloneMaterial)
クラス Geometry の記述:
This version of clone is a shallow clone, in other words, the same mesh is referenced as the original geometry. Exception: if the mesh is marked as being a software animated mesh, (bind pose is set) then the positions and normals are deep copied.

オーバーライド:
クラス Geometry 内の clone
戻り値:
A clone of this Spatial, the scene graph in its entirety is cloned and can be altered independently of the original scene graph. Note that meshes of geometries are not cloned explicitly, they are shared if static, or specially cloned if animated. All controls will be cloned using the Control.cloneForSpatial method on the clone.
関連項目:
Mesh.cloneForAnim()

setShape

public void setShape(EmitterShape shape)

getShape

public EmitterShape getShape()

setParticleInfluencer

public void setParticleInfluencer(ParticleInfluencer particleInfluencer)
Set the ParticleInfluencer to influence this particle emitter.

パラメータ:
particleInfluencer - the ParticleInfluencer to influence this particle emitter.
関連項目:
ParticleInfluencer

getParticleInfluencer

public ParticleInfluencer getParticleInfluencer()
Returns the ParticleInfluencer that influences this particle emitter.

戻り値:
the ParticleInfluencer that influences this particle emitter.
関連項目:
ParticleInfluencer

getMeshType

public ParticleMesh.Type getMeshType()
Returns the mesh type used by the particle emitter.

戻り値:
the mesh type used by the particle emitter.
関連項目:
setMeshType(com.jme3.effect.ParticleMesh.Type), ParticleEmitter(java.lang.String, com.jme3.effect.ParticleMesh.Type, int)

setMeshType

public void setMeshType(ParticleMesh.Type meshType)
Sets the type of mesh used by the particle emitter.

パラメータ:
meshType - The mesh type to use

isInWorldSpace

public boolean isInWorldSpace()
Returns true if particles should spawn in world space.

戻り値:
true if particles should spawn in world space.
関連項目:
setInWorldSpace(boolean)

setInWorldSpace

public void setInWorldSpace(boolean worldSpace)
Set to true if particles should spawn in world space.

If set to true and the particle emitter is moved in the scene, then particles that have already spawned won't be effected by this motion. If set to false, the particles will emit in local space and when the emitter is moved, so are all the particles that were emitted previously.

パラメータ:
worldSpace - true if particles should spawn in world space.

getNumVisibleParticles

public int getNumVisibleParticles()
Returns the number of visible particles (spawned but not dead).

戻り値:
the number of visible particles

setNumParticles

public final void setNumParticles(int numParticles)
Set the maximum amount of particles that can exist at the same time with this emitter. Calling this method many times is not recommended.

パラメータ:
numParticles - the maximum amount of particles that can exist at the same time with this emitter.

getMaxNumParticles

public int getMaxNumParticles()

getParticles

public Particle[] getParticles()
Returns a list of all particles (shouldn't be used in most cases).

This includes both existing and non-existing particles. The size of the array is set to the numParticles value specified in the constructor or setNumParticles(int) method.

戻り値:
a list of all particles.

getFaceNormal

public Vector3f getFaceNormal()
Get the normal which particles are facing.

戻り値:
the normal which particles are facing.
関連項目:
setFaceNormal(com.jme3.math.Vector3f)

setFaceNormal

public void setFaceNormal(Vector3f faceNormal)
Sets the normal which particles are facing.

By default, particles will face the camera, but for some effects (e.g shockwave) it may be necessary to face a specific direction instead. To restore normal functionality, provide null as the argument for faceNormal.

パラメータ:
faceNormal - The normals particles should face, or null if particles should face the camera.

getRotateSpeed

public float getRotateSpeed()
Returns the rotation speed in radians/sec for particles.

戻り値:
the rotation speed in radians/sec for particles.
関連項目:
setRotateSpeed(float)

setRotateSpeed

public void setRotateSpeed(float rotateSpeed)
Set the rotation speed in radians/sec for particles spawned after the invocation of this method.

パラメータ:
rotateSpeed - the rotation speed in radians/sec for particles spawned after the invocation of this method.

isRandomAngle

public boolean isRandomAngle()
Returns true if every particle spawned should have a random facing angle.

戻り値:
true if every particle spawned should have a random facing angle.
関連項目:
setRandomAngle(boolean)

setRandomAngle

public void setRandomAngle(boolean randomAngle)
Set to true if every particle spawned should have a random facing angle.

パラメータ:
randomAngle - if every particle spawned should have a random facing angle.

isSelectRandomImage

public boolean isSelectRandomImage()
Returns true if every particle spawned should get a random image.

戻り値:
True if every particle spawned should get a random image.
関連項目:
setSelectRandomImage(boolean)

setSelectRandomImage

public void setSelectRandomImage(boolean selectRandomImage)
Set to true if every particle spawned should get a random image from a pool of images constructed from the texture, with X by Y possible images.

By default, X and Y are equal to 1, thus allowing only 1 possible image to be selected, but if the particle is configured with multiple images by using setImagesX(int) and {#link ParticleEmitter#setImagesY(int) } methods, then multiple images can be selected. Setting to false will cause each particle to have an animation of images displayed, starting at image 1, and going until image X*Y when the particle reaches its end of life.

パラメータ:
selectRandomImage - True if every particle spawned should get a random image.

isFacingVelocity

public boolean isFacingVelocity()
Check if particles spawned should face their velocity.

戻り値:
True if particles spawned should face their velocity.
関連項目:
setFacingVelocity(boolean)

setFacingVelocity

public void setFacingVelocity(boolean followVelocity)
Set to true if particles spawned should face their velocity (or direction to which they are moving towards).

This is typically used for e.g spark effects.

パラメータ:
followVelocity - True if particles spawned should face their velocity.

getEndColor

public ColorRGBA getEndColor()
Get the end color of the particles spawned.

戻り値:
the end color of the particles spawned.
関連項目:
setEndColor(com.jme3.math.ColorRGBA)

setEndColor

public void setEndColor(ColorRGBA endColor)
Set the end color of the particles spawned.

The particle color at any time is determined by blending the start color and end color based on the particle's current time of life relative to its end of life.

パラメータ:
endColor - the end color of the particles spawned.

getEndSize

public float getEndSize()
Get the end size of the particles spawned.

戻り値:
the end size of the particles spawned.
関連項目:
setEndSize(float)

setEndSize

public void setEndSize(float endSize)
Set the end size of the particles spawned.

The particle size at any time is determined by blending the start size and end size based on the particle's current time of life relative to its end of life.

パラメータ:
endSize - the end size of the particles spawned.

setGravity

@Deprecated
public void setGravity(float gravity)
推奨されていません。 Use {@link ParticleEmitter#setGravity(float, float, float) instead.

This method sets the gravity value of Y axis. By default the Y axis is the only one to have gravity value non zero.

パラメータ:
gravity - Set the gravity of Y axis, in units/sec/sec, of particles spawned.

getGravity

public Vector3f getGravity()
Get the gravity vector.

戻り値:
the gravity vector.
関連項目:
setGravity(com.jme3.math.Vector3f)

setGravity

public void setGravity(Vector3f gravity)
This method sets the gravity vector.

パラメータ:
gravity - the gravity vector

setGravity

public void setGravity(float x,
                       float y,
                       float z)
Sets the gravity vector.

パラメータ:
gravity - the gravity vector

getHighLife

public float getHighLife()
Get the high value of life.

戻り値:
the high value of life.
関連項目:
setHighLife(float)

setHighLife

public void setHighLife(float highLife)
Set the high value of life.

The particle's lifetime/expiration is determined by randomly selecting a time between low life and high life.

パラメータ:
highLife - the high value of life.

getImagesX

public int getImagesX()
Get the number of images along the X axis (width).

戻り値:
the number of images along the X axis (width).
関連項目:
setImagesX(int)

setImagesX

public void setImagesX(int imagesX)
Set the number of images along the X axis (width).

To determine how multiple particle images are selected and used, see the setSelectRandomImage(boolean) method.

パラメータ:
imagesX - the number of images along the X axis (width).

getImagesY

public int getImagesY()
Get the number of images along the Y axis (height).

戻り値:
the number of images along the Y axis (height).
関連項目:
setImagesY(int)

setImagesY

public void setImagesY(int imagesY)
Set the number of images along the Y axis (height).

To determine how multiple particle images are selected and used, see the setSelectRandomImage(boolean) method.

パラメータ:
imagesY - the number of images along the Y axis (height).

getLowLife

public float getLowLife()
Get the low value of life.

戻り値:
the low value of life.
関連項目:
setLowLife(float)

setLowLife

public void setLowLife(float lowLife)
Set the low value of life.

The particle's lifetime/expiration is determined by randomly selecting a time between low life and high life.

パラメータ:
lowLife - the low value of life.

getParticlesPerSec

public float getParticlesPerSec()
Get the number of particles to spawn per second.

戻り値:
the number of particles to spawn per second.
関連項目:
setParticlesPerSec(float)

setParticlesPerSec

public void setParticlesPerSec(float particlesPerSec)
Set the number of particles to spawn per second.

パラメータ:
particlesPerSec - the number of particles to spawn per second.

getStartColor

public ColorRGBA getStartColor()
Get the start color of the particles spawned.

戻り値:
the start color of the particles spawned.
関連項目:
setStartColor(com.jme3.math.ColorRGBA)

setStartColor

public void setStartColor(ColorRGBA startColor)
Set the start color of the particles spawned.

The particle color at any time is determined by blending the start color and end color based on the particle's current time of life relative to its end of life.

パラメータ:
startColor - the start color of the particles spawned

getStartSize

public float getStartSize()
Get the start color of the particles spawned.

戻り値:
the start color of the particles spawned.
関連項目:
setStartSize(float)

setStartSize

public void setStartSize(float startSize)
Set the start size of the particles spawned.

The particle size at any time is determined by blending the start size and end size based on the particle's current time of life relative to its end of life.

パラメータ:
startSize - the start size of the particles spawned.

getInitialVelocity

@Deprecated
public Vector3f getInitialVelocity()
推奨されていません。 Use ParticleEmitter.getParticleInfluencer().getInitialVelocity() instead.


setInitialVelocity

@Deprecated
public void setInitialVelocity(Vector3f initialVelocity)
推奨されていません。 This method is deprecated. Use ParticleEmitter.getParticleInfluencer().setInitialVelocity(initialVelocity); instead.

パラメータ:
initialVelocity - Set the initial velocity a particle is spawned with, the initial velocity given in the parameter will be varied according to the velocity variation set in setVelocityVariation(float). A particle will move toward its velocity unless it is effected by the gravity.
関連項目:
setVelocityVariation(float), setGravity(float)

getVelocityVariation

@Deprecated
public float getVelocityVariation()
推奨されていません。 This method is deprecated. Use ParticleEmitter.getParticleInfluencer().getVelocityVariation(); instead.

戻り値:
the initial velocity variation factor

setVelocityVariation

@Deprecated
public void setVelocityVariation(float variation)
推奨されていません。 This method is deprecated. Use ParticleEmitter.getParticleInfluencer().setVelocityVariation(variation); instead.

パラメータ:
variation - Set the variation by which the initial velocity of the particle is determined. variation should be a value from 0 to 1, where 0 means particles are to spawn with exactly the velocity given in ParticleEmitter#setStartVel(com.jme3.math.Vector3f) , and 1 means particles are to spawn with a completely random velocity.

emitAllParticles

public void emitAllParticles()
Instantly emits all the particles possible to be emitted. Any particles which are currently inactive will be spawned immediately.


killAllParticles

public void killAllParticles()
Instantly kills all active particles, after this method is called, all particles will be dead and no longer visible.


setEnabled

public void setEnabled(boolean enabled)
Set to enable or disable the particle emitter

When a particle is disabled, it will be "frozen in time" and not update.

パラメータ:
enabled - True to enable the particle emitter

isEnabled

public boolean isEnabled()
Check if a particle emitter is enabled for update.

戻り値:
True if a particle emitter is enabled for update.
関連項目:
setEnabled(boolean)

updateFromControl

public void updateFromControl(float tpf)
Callback from Control.update(), do not use.

パラメータ:
tpf -

preload

public void preload(RenderManager rm,
                    ViewPort vp)

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
オーバーライド:
クラス Geometry 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
オーバーライド:
クラス Geometry 内の read
例外:
java.io.IOException