public class KeyFrame<T extends IData<T>> extends java.lang.Object implements java.lang.Cloneable, java.lang.Iterable<KeyData<T>>
| Modifier and Type | Class and Description |
|---|---|
static interface |
KeyFrame.ICompressorRule<T extends IData<T>> |
| Constructor and Description |
|---|
KeyFrame() |
KeyFrame(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all keys
|
KeyFrame<T> |
clone() |
int |
compress(KeyFrame.ICompressorRule<T> rule)
|
float |
getEndTime() |
KeyData<T> |
getIndex(int index)
The implementation is free to return a copy or the actual object.
|
int |
getKeyIndexAfter(float time) |
int |
getKeyIndexBefore(float time) |
boolean |
getKeyRange(KeyRange<T> dst,
AnimNode node) |
boolean |
getKeyRange(KeyRange<T> dst,
float time) |
float |
getStartTime() |
float |
getTimeAt(int index) |
void |
getValue(T dst,
AnimNode node) |
void |
getValue(T dst,
float time) |
T |
getValueAt(int index) |
int |
insert(float time,
T value) |
int |
insert(KeyData<T> keyData) |
void |
insertOrdered(float time,
T value,
int index) |
int |
insertTimes(java.util.Set<java.lang.Float> timesSet) |
boolean |
isEmpty() |
java.util.Iterator<KeyData<T>> |
iterator() |
void |
listKeyTimes(java.util.Set<java.lang.Float> timesSet) |
void |
listKeyTimes(java.util.Set<java.lang.Float> timesSet,
Animation anim) |
void |
offsetTime(float timeOffset) |
static KeyFrame |
read(ByteInputStream in) |
KeyData<T> |
removeIndex(int index) |
void |
set(KeyFrame<T> src) |
boolean |
setIndex(int index,
KeyData<T> keyData) |
void |
setValueAt(int index,
T value) |
int |
size() |
KeyFrame<T> |
subRange(float startTime,
float endTime) |
KeyFrame<T> |
subRange(int startIndex,
int endIndex) |
void |
trimToSize() |
static void |
write(ByteOutputStream out,
KeyFrame<?> keys,
java.lang.Class<?> c) |
public KeyFrame()
public KeyFrame(int initialCapacity)
initialCapacity - initial size of the vector of keys.public static final KeyFrame read(ByteInputStream in) throws java.io.IOException
java.io.IOExceptionpublic static final void write(ByteOutputStream out, KeyFrame<?> keys, java.lang.Class<?> c) throws java.io.IOException
java.io.IOExceptionpublic final int size()
public final boolean isEmpty()
public final int insert(float time,
T value)
time - time of the key to insertvalue - value of the key to insertKeyData time already exist in thispublic final void insertOrdered(float time,
T value,
int index)
time - time of the key to insertvalue - value of the key to insertpublic final KeyFrame<T> subRange(float startTime, float endTime)
KeyFrame containing the subRange [startTime; endTime]public KeyFrame<T> subRange(int startIndex, int endIndex)
KeyFrame containing the key between the indices [startIndex; endIndex]public final void offsetTime(float timeOffset)
public final void clear()
public final void trimToSize()
public final KeyData<T> getIndex(int index)
setIndex(int, KeyData) to reflect the changes.public final T getValueAt(int index)
public final float getTimeAt(int index)
public final void setValueAt(int index,
T value)
value - set the value at the specified indexpublic final float getStartTime()
KeyFrame must contains at least one elementpublic final float getEndTime()
KeyFrame must contains at least one elementpublic final void getValue(T dst, float time)
public final boolean getKeyRange(KeyRange<T> dst, float time)
time - time in secondsdst - destination KeyRange to store result.public final boolean getKeyRange(KeyRange<T> dst, AnimNode node)
dst - destination KeyRange to store result.track - KeyRange to store result.public final int getKeyIndexBefore(float time)
time - public final int getKeyIndexAfter(float time)
time - public void listKeyTimes(java.util.Set<java.lang.Float> timesSet)
timesSet - set to contains the list of times of this KeyFramepublic void listKeyTimes(java.util.Set<java.lang.Float> timesSet,
Animation anim)
anim - animation to list timestimesSet - set to contains the list of times for the anim of this KeyFramepublic final int insertTimes(java.util.Set<java.lang.Float> timesSet)
timesSet - list of times to insert in this KeyFrame.public int compress(KeyFrame.ICompressorRule<T> rule)
rule - compression ruleOptimizerBonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com