Class B3DLoader.B3DState
- java.lang.Object
-
- net.minecraftforge.client.model.b3d.B3DLoader.B3DState
-
- All Implemented Interfaces:
IModelTransform
,IForgeModelTransform
- Enclosing class:
- B3DLoader
public static final class B3DLoader.B3DState extends java.lang.Object implements IModelTransform
-
-
Field Summary
Fields Modifier and Type Field Description private B3DModel.Animation
animation
private static com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Triple<B3DModel.Animation,B3DModel.Node<?>,java.lang.Integer>,TransformationMatrix>
cache
private int
frame
private int
nextFrame
private IModelTransform
parent
private float
progress
-
Constructor Summary
Constructors Constructor Description B3DState(B3DModel.Animation animation, int frame)
B3DState(B3DModel.Animation animation, int frame, int nextFrame, float progress)
B3DState(B3DModel.Animation animation, int frame, int nextFrame, float progress, IModelTransform parent)
B3DState(B3DModel.Animation animation, int frame, IModelTransform parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description B3DModel.Animation
getAnimation()
int
getFrame()
int
getNextFrame()
static TransformationMatrix
getNodeMatrix(B3DModel.Animation animation, B3DModel.Node<?> node, int frame)
TransformationMatrix
getNodeMatrix(B3DModel.Node<?> node)
TransformationMatrix
getNodeMatrix(B3DModel.Node<?> node, int frame)
IModelTransform
getParent()
private IModelTransform
getParent(IModelTransform parent)
TransformationMatrix
getPartTransformation(java.lang.Object part)
float
getProgress()
TransformationMatrix
getRotation()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.renderer.model.IModelTransform
isUvLocked
-
-
-
-
Field Detail
-
animation
@Nullable private final B3DModel.Animation animation
-
frame
private final int frame
-
nextFrame
private final int nextFrame
-
progress
private final float progress
-
parent
@Nullable private final IModelTransform parent
-
cache
private static com.google.common.cache.LoadingCache<org.apache.commons.lang3.tuple.Triple<B3DModel.Animation,B3DModel.Node<?>,java.lang.Integer>,TransformationMatrix> cache
-
-
Constructor Detail
-
B3DState
public B3DState(@Nullable B3DModel.Animation animation, int frame)
-
B3DState
public B3DState(@Nullable B3DModel.Animation animation, int frame, IModelTransform parent)
-
B3DState
public B3DState(@Nullable B3DModel.Animation animation, int frame, int nextFrame, float progress)
-
B3DState
public B3DState(@Nullable B3DModel.Animation animation, int frame, int nextFrame, float progress, @Nullable IModelTransform parent)
-
-
Method Detail
-
getParent
@Nullable private IModelTransform getParent(@Nullable IModelTransform parent)
-
getAnimation
@Nullable public B3DModel.Animation getAnimation()
-
getFrame
public int getFrame()
-
getNextFrame
public int getNextFrame()
-
getProgress
public float getProgress()
-
getParent
@Nullable public IModelTransform getParent()
-
getRotation
public TransformationMatrix getRotation()
- Specified by:
getRotation
in interfaceIModelTransform
-
getPartTransformation
public TransformationMatrix getPartTransformation(java.lang.Object part)
- Specified by:
getPartTransformation
in interfaceIForgeModelTransform
- Parameters:
part
- Part of the model we are wanting to transform. An empty optional means we want a transform for the entire model.- Returns:
- A transformation to apply to the part, if any. The coordinate system of the transform is determined by the part type.
-
getNodeMatrix
public TransformationMatrix getNodeMatrix(B3DModel.Node<?> node)
-
getNodeMatrix
public TransformationMatrix getNodeMatrix(B3DModel.Node<?> node, int frame)
-
getNodeMatrix
public static TransformationMatrix getNodeMatrix(@Nullable B3DModel.Animation animation, B3DModel.Node<?> node, int frame)
-
-