public class SkinClipSequence extends Object implements Serializable, Iterable<SkinClip>
A sequence of SkinClip
s. A ClipSequence is analogue of jPCT's Animation
sequence.
A ClipSequence can be assigned to a Animated3D
and the object can be
directly animated
Animated3D.setSkinClipSequence(SkinClipSequence)
,
Animated3D.animateSkin(float, int)
,
Serialized FormConstructor and Description |
---|
SkinClipSequence(List<SkinClip> clips)
Same as
SkinClipSequence(SkinClip...) but uses a List instead of array. |
SkinClipSequence(SkinClip... clips)
Creates a ClipSequence out of given clips.
|
Modifier and Type | Method and Description |
---|---|
void |
addClip(SkinClip clip) |
SkinClip |
getClip(int index)
Returns the specified clip
|
int |
getSize()
Returns number of clips
|
Skeleton |
getSkeleton()
return the skeleton this clip is related to.
|
float |
getTime()
return total time of clips in seconds
|
Iterator<SkinClip> |
iterator()
Returns an iterator of
SkinClip s. |
static SkinClipSequence |
merge(SkinClipSequence... sequences)
Merges many
SkinClipSequence s into one. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SkinClipSequence(SkinClip... clips)
Creates a ClipSequence out of given clips. All clips should be bound to same skeleton.
If not, consider using merge(SkinClipSequence...)
merge(SkinClipSequence...)
public SkinClipSequence(List<SkinClip> clips)
Same as SkinClipSequence(SkinClip...)
but uses a List instead of array.
SkinClipSequence(SkinClip...)
public int getSize()
public SkinClip getClip(int index)
public float getTime()
public Skeleton getSkeleton()
public void addClip(SkinClip clip)
public static SkinClipSequence merge(SkinClipSequence... sequences)
Merges many SkinClipSequence
s into one. This method
does not require all ClipSequences share the same Skeleton
but skeletons are almost identical.
If many ClipSequences are loaded from different files, their skeleton objects will be different even if they are identical. This method is meant to help such cases.
This method always uses the skeleton of first sequence.