@Deprecated public class EffectTrack extends java.lang.Object implements ClonableTrack
AnimControl control model.getControl(AnimControl.class); EffectTrack track = new EffectTrack(existingEmmitter, control.getAnim("TheAnim").getLength()); control.getAnim("TheAnim").addTrack(track);if the emitter emits 0 particles per second, emitAllPArticles will be called on it at time 0 + startOffset. if it has more it will start emitting normally at time 0 + startOffset.
Modifier and Type | Class and Description |
---|---|
static class |
EffectTrack.KillParticleControl
Deprecated.
|
Modifier | Constructor and Description |
---|---|
protected |
EffectTrack()
Deprecated.
constructor only for serialization
|
|
EffectTrack(ParticleEmitter emitter,
float length)
Deprecated.
Creates and EffectTrack
|
|
EffectTrack(ParticleEmitter emitter,
float length,
float startOffset)
Deprecated.
Creates and EffectTrack
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUp()
Deprecated.
Method responsible of cleaning UserData on referenced Spatials when the Track is deleted
|
Track |
clone()
Deprecated.
Clone this track
|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Deprecated.
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
Track |
cloneForSpatial(Spatial spatial)
Deprecated.
This method clone the Track and search for the cloned counterpart of the
original emitter in the given cloned spatial.
|
ParticleEmitter |
getEmitter()
Deprecated.
|
float[] |
getKeyFrameTimes()
Deprecated.
Get the times in seconds for all keyframes.
|
float |
getLength()
Deprecated.
Return the length of the track
|
float |
getStartOffset()
Deprecated.
|
java.lang.Object |
jmeClone()
Deprecated.
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im)
Deprecated.
Internal use only serialization
|
void |
setEmitter(ParticleEmitter emitter)
Deprecated.
Sets the Emitter to use in this track
|
void |
setStartOffset(float startOffset)
Deprecated.
set the start offset of the track
|
void |
setTime(float time,
float weight,
AnimControl control,
AnimChannel channel,
TempVars vars)
Deprecated.
Internal use only
|
void |
write(JmeExporter ex)
Deprecated.
Internal use only serialization
|
protected EffectTrack()
public EffectTrack(ParticleEmitter emitter, float length)
emitter
- the emitter of the tracklength
- the length of the track (usually the length of the
animation you want to add the track to)public EffectTrack(ParticleEmitter emitter, float length, float startOffset)
emitter
- the emitter of the tracklength
- the length of the track (usually the length of the
animation you want to add the track to)startOffset
- the time in second when the emitter will be triggered
after the animation starts (default is 0)public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars)
setTime
in interface Track
time
- The time in the animationweight
- The weight from 0 to 1 on how much to apply the trackcontrol
- The control which the track should affectchannel
- The channel which the track should affectTrack.setTime(float, float, com.jme3.animation.AnimControl,
com.jme3.animation.AnimChannel, com.jme3.util.TempVars)
public float getLength()
public float[] getKeyFrameTimes()
Track
length
.
Modifying the provided array is not allowed, as it may corrupt internal
state.getKeyFrameTimes
in interface Track
public Track clone()
public Track cloneForSpatial(Spatial spatial)
cloneForSpatial
in interface ClonableTrack
spatial
- the Spatial holding the AnimControlpublic java.lang.Object jmeClone()
JmeCloneable
This method is separate from the regular clone() method so that objects might still maintain their own regular java clone() semantics (perhaps even using Cloner for those methods). However, because Java's clone() has specific features in the sense of Object's clone() implementation, it's usually best to have some path for subclasses to bypass the public clone() method that might be cloning fields and instead get at the superclass protected clone() methods. For example, through super.jmeClone() or another protected clone method that some base class eventually calls super.clone() in.
jmeClone
in interface JmeCloneable
public void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields
in interface JmeCloneable
cloner
- The cloner that is performing the cloning operation. The
cloneFields method can call back into the cloner to make
clones of its subordinate fields.original
- The original object from which this object was cloned.
This is provided for the very rare case that this object needs
to refer to its original for some reason. In general, all of
the relevant values should have been transferred during the
shallow clone and this object need merely clone what it wants.public void cleanUp()
ClonableTrack
cleanUp
in interface ClonableTrack
public ParticleEmitter getEmitter()
public void setEmitter(ParticleEmitter emitter)
emitter
- public float getStartOffset()
public void setStartOffset(float startOffset)
startOffset
- public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException