Track length getter added.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8304 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
6c341850d2
commit
ce259299e2
@ -252,6 +252,13 @@ public final class BoneTrack implements Track<Skeleton> {
|
|||||||
target.setAnimTransforms(tempV, tempQ, scales != null ? tempS : null);
|
target.setAnimTransforms(tempV, tempQ, scales != null ? tempS : null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the length of the track
|
||||||
|
*/
|
||||||
|
public float getLength() {
|
||||||
|
return times == null ? 0 : times[times.length - 1] - times[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method creates a clone of the current object.
|
* This method creates a clone of the current object.
|
||||||
|
@ -144,6 +144,13 @@ public final class PoseTrack implements Track<Mesh[]> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the length of the track
|
||||||
|
*/
|
||||||
|
public float getLength() {
|
||||||
|
return times == null ? 0 : times[times.length - 1] - times[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
@ -180,6 +180,13 @@ public class SpatialTrack implements Track<Spatial> {
|
|||||||
public Vector3f[] getTranslations() {
|
public Vector3f[] getTranslations() {
|
||||||
return translations.toObjectArray();
|
return translations.toObjectArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the length of the track
|
||||||
|
*/
|
||||||
|
public float getLength() {
|
||||||
|
return times == null ? 0 : times[times.length - 1] - times[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method creates a clone of the current object.
|
* This method creates a clone of the current object.
|
||||||
|
@ -88,6 +88,11 @@ public interface Track<T> extends Savable, Cloneable {
|
|||||||
*/
|
*/
|
||||||
Vector3f[] getTranslations();
|
Vector3f[] getTranslations();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the length of the track
|
||||||
|
*/
|
||||||
|
float getLength();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user