@Deprecated public class EffectTrack extends java.lang.Object implements ClonableTrack
AnimControl control model.getControl(AnimControl.class);
EffectTrack track = new EffectTrack(existingEmitter, 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 for cleaning UserData on referenced Spatials when the Track is deleted
|
EffectTrack |
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 Tracktime - 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 affectvars - temporary storageTrack.setTime(float, float, com.jme3.animation.AnimControl,
com.jme3.animation.AnimChannel, com.jme3.util.TempVars)public float getLength()
public float[] getKeyFrameTimes()
Tracklength.
Modifying the provided array is not allowed, as it may corrupt internal
state.getKeyFrameTimes in interface Trackpublic EffectTrack clone()
public Track cloneForSpatial(Spatial spatial)
cloneForSpatial in interface ClonableTrackspatial - the Spatial holding the AnimControlpublic java.lang.Object jmeClone()
JmeCloneableThis 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 JmeCloneablepublic void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneableNote: 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 JmeCloneablecloner - 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 only clone what it wants.public void cleanUp()
ClonableTrackcleanUp in interface ClonableTrackpublic ParticleEmitter getEmitter()
public void setEmitter(ParticleEmitter emitter)
emitter - the emitter to be controlled (alias created)public float getStartOffset()
public void setStartOffset(float startOffset)
startOffset - the start offset (in seconds)public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException