Package com.jme3.animation
Class EffectTrack
java.lang.Object
com.jme3.animation.EffectTrack
- All Implemented Interfaces:
ClonableTrack
,Track
,Savable
,JmeCloneable
,Cloneable
Deprecated.
EffectTrack is a track to add to an existing animation, to emit particles
during animations for example: exhaust, dust raised by footsteps, shock
waves, lightning, etc...
usage is
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.
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.constructor only for serializationEffectTrack
(ParticleEmitter emitter, float length) Deprecated.Creates and EffectTrackEffectTrack
(ParticleEmitter emitter, float length, float startOffset) Deprecated.Creates and EffectTrack -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
Deprecated.Method responsible for cleaning UserData on referenced Spatials when the Track is deletedclone()
Deprecated.Clone this trackvoid
cloneFields
(Cloner cloner, Object original) Deprecated.Implemented to perform deep cloning for this object, resolving local cloned references using the specified cloner.cloneForSpatial
(Spatial spatial) Deprecated.This method clone the Track and search for the cloned counterpart of the original emitter in the given cloned spatial.Deprecated.float[]
Deprecated.Get the times in seconds for all keyframes.float
Deprecated.Return the length of the trackfloat
Deprecated.jmeClone()
Deprecated.Performs a regular shallow clone of the object.void
read
(JmeImporter im) Deprecated.Internal use only serializationvoid
setEmitter
(ParticleEmitter emitter) Deprecated.Sets the Emitter to use in this trackvoid
setStartOffset
(float startOffset) Deprecated.set the start offset of the trackvoid
setTime
(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars) Deprecated.Internal use onlyvoid
write
(JmeExporter ex) Deprecated.Internal use only serialization
-
Constructor Details
-
EffectTrack
protected EffectTrack()Deprecated.constructor only for serialization -
EffectTrack
Deprecated.Creates and EffectTrack- Parameters:
emitter
- the emitter of the tracklength
- the length of the track (usually the length of the animation you want to add the track to)
-
EffectTrack
Deprecated.Creates and EffectTrack- Parameters:
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)
-
-
Method Details
-
setTime
public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars) Deprecated.Internal use only -
getLength
public float getLength()Deprecated.Return the length of the track -
getKeyFrameTimes
public float[] getKeyFrameTimes()Deprecated.Description copied from interface:Track
Get the times in seconds for all keyframes. All keyframe times should be between 0.0 andlength
. Modifying the provided array is not allowed, as it may corrupt internal state.- Specified by:
getKeyFrameTimes
in interfaceTrack
- Returns:
- the keyframe times
-
clone
Deprecated.Clone this track -
cloneForSpatial
Deprecated.This method clone the Track and search for the cloned counterpart of the original emitter in the given cloned spatial. The spatial is assumed to be the Spatial holding the AnimControl controlling the animation using this Track.- Specified by:
cloneForSpatial
in interfaceClonableTrack
- Parameters:
spatial
- the Spatial holding the AnimControl- Returns:
- the cloned Track with proper reference
-
jmeClone
Deprecated.Description copied from interface:JmeCloneable
Performs a regular shallow clone of the object. Some fields may also be cloned but generally only if they will never be shared with other objects. (For example, local Vector3fs and so on.)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.
- Specified by:
jmeClone
in interfaceJmeCloneable
- Returns:
- a new instance
-
cloneFields
Deprecated.Description copied from interface:JmeCloneable
Implemented to perform deep cloning for this object, resolving local cloned references using the specified cloner. The object can call cloner.clone(fieldValue) to deep clone any of its fields.Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
- Specified by:
cloneFields
in interfaceJmeCloneable
- Parameters:
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 only clone what it wants.
-
cleanUp
public void cleanUp()Deprecated.Description copied from interface:ClonableTrack
Method responsible for cleaning UserData on referenced Spatials when the Track is deleted- Specified by:
cleanUp
in interfaceClonableTrack
-
getEmitter
Deprecated.- Returns:
- the emitter used by this track
-
setEmitter
Deprecated.Sets the Emitter to use in this track- Parameters:
emitter
- the emitter to be controlled (alias created)
-
getStartOffset
public float getStartOffset()Deprecated.- Returns:
- the start offset of the track
-
setStartOffset
public void setStartOffset(float startOffset) Deprecated.set the start offset of the track- Parameters:
startOffset
- the start offset (in seconds)
-
write
Deprecated.Internal use only serialization- Specified by:
write
in interfaceSavable
- Parameters:
ex
- exporter- Throws:
IOException
- exception
-
read
Deprecated.Internal use only serialization- Specified by:
read
in interfaceSavable
- Parameters:
im
- importer- Throws:
IOException
- Exception
-