2016-03-21 07:01:30 +00:00
|
|
|
package net.minecraftforge.common.model.animation;
|
2016-01-01 15:15:48 +00:00
|
|
|
|
2016-03-21 07:01:30 +00:00
|
|
|
import net.minecraftforge.common.model.TRSRTransformation;
|
2016-01-01 15:15:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Various implementations of IJointClip.
|
|
|
|
*/
|
|
|
|
public final class JointClips
|
|
|
|
{
|
|
|
|
public static enum IdentityJointClip implements IJointClip
|
|
|
|
{
|
2016-03-21 07:23:27 +00:00
|
|
|
INSTANCE;
|
2016-01-01 15:15:48 +00:00
|
|
|
|
|
|
|
public TRSRTransformation apply(float time)
|
|
|
|
{
|
|
|
|
return TRSRTransformation.identity();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static class NodeJointClip implements IJointClip
|
|
|
|
{
|
|
|
|
private final IJoint child;
|
|
|
|
private final IClip clip;
|
|
|
|
|
|
|
|
public NodeJointClip(IJoint joint, IClip clip)
|
|
|
|
{
|
|
|
|
this.child = joint;
|
|
|
|
this.clip = clip;
|
|
|
|
}
|
|
|
|
|
|
|
|
public TRSRTransformation apply(float time)
|
|
|
|
{
|
|
|
|
return clip.apply(child).apply(time);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|