Animation Track interface: add getKeyFrameTimes() method
This commit is contained in:
parent
d281920e60
commit
c5359c7359
@ -150,6 +150,11 @@ public class AudioTrack implements ClonableTrack {
|
|||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float[] getKeyFrameTimes() {
|
||||||
|
return new float[] { startOffset };
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clone this track
|
* Clone this track
|
||||||
*
|
*
|
||||||
|
@ -257,6 +257,11 @@ public final class BoneTrack implements Track {
|
|||||||
return times == null ? 0 : times[times.length - 1] - times[0];
|
return times == null ? 0 : times[times.length - 1] - times[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float[] getKeyFrameTimes() {
|
||||||
|
return times;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method creates a clone of the current object.
|
* This method creates a clone of the current object.
|
||||||
* @return a clone of the current object
|
* @return a clone of the current object
|
||||||
|
@ -239,6 +239,11 @@ public class EffectTrack implements ClonableTrack {
|
|||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float[] getKeyFrameTimes() {
|
||||||
|
return new float[] { startOffset };
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clone this track
|
* Clone this track
|
||||||
*
|
*
|
||||||
|
@ -165,6 +165,11 @@ public final class PoseTrack implements Track {
|
|||||||
return times == null ? 0 : times[times.length - 1] - times[0];
|
return times == null ? 0 : times[times.length - 1] - times[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float[] getKeyFrameTimes() {
|
||||||
|
return times;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method creates a clone of the current object.
|
* This method creates a clone of the current object.
|
||||||
* @return a clone of the current object
|
* @return a clone of the current object
|
||||||
|
@ -236,6 +236,11 @@ public class SpatialTrack implements Track {
|
|||||||
return times == null ? 0 : times[times.length - 1] - times[0];
|
return times == null ? 0 : times[times.length - 1] - times[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float[] getKeyFrameTimes() {
|
||||||
|
return times;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method creates a clone of the current object.
|
* This method creates a clone of the current object.
|
||||||
* @return a clone of the current object
|
* @return a clone of the current object
|
||||||
|
@ -60,4 +60,15 @@ public interface Track extends Savable, Cloneable {
|
|||||||
* @return a clone of the current object
|
* @return a clone of the current object
|
||||||
*/
|
*/
|
||||||
public Track clone();
|
public Track clone();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the times in seconds for all keyframes.
|
||||||
|
*
|
||||||
|
* All keyframe times should be between 0.0 and {@link #getLength() length}.
|
||||||
|
* Modifying the provided array is not allowed, as it may corrupt internal
|
||||||
|
* state.
|
||||||
|
*
|
||||||
|
* @return the keyframe times
|
||||||
|
*/
|
||||||
|
public float[] getKeyFrameTimes();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user