public final class TRSRTransformation extends java.lang.Object implements IModelState, ITransformation
Constructor and Description |
---|
TRSRTransformation(EnumFacing facing) |
TRSRTransformation(ItemTransformVec3f transform)
Deprecated.
|
TRSRTransformation(javax.vecmath.Matrix4f matrix) |
TRSRTransformation(ModelRotation rotation) |
TRSRTransformation(javax.vecmath.Vector3f translation,
javax.vecmath.Quat4f leftRot,
javax.vecmath.Vector3f scale,
javax.vecmath.Quat4f rightRot) |
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<TRSRTransformation> |
apply(com.google.common.base.Optional<? extends IModelPart> part) |
static TRSRTransformation |
blockCenterToCorner(TRSRTransformation transform)
convert transformation from assuming center-block system to corner-block system
|
static TRSRTransformation |
blockCornerToCenter(TRSRTransformation transform)
convert transformation from assuming corner-block system to center-block system
|
TRSRTransformation |
compose(TRSRTransformation b) |
boolean |
equals(java.lang.Object obj) |
javax.vecmath.Quat4f |
getLeftRot() |
javax.vecmath.Matrix4f |
getMatrix() |
static javax.vecmath.Matrix4f |
getMatrix(EnumFacing facing) |
javax.vecmath.Quat4f |
getRightRot() |
javax.vecmath.Vector3f |
getScale() |
javax.vecmath.Vector3f |
getTranslation() |
TRSRTransformation |
getUVLockTransform(EnumFacing originalSide) |
static TRSRTransformation |
getVanillaUvTransformGlobalToLocal(EnumFacing side) |
static TRSRTransformation |
getVanillaUvTransformLocalToGlobal(EnumFacing side) |
int |
hashCode() |
static TRSRTransformation |
identity() |
TRSRTransformation |
inverse() |
static boolean |
isInteger(javax.vecmath.Matrix4f matrix) |
static javax.vecmath.Vector3f |
lerp(javax.vecmath.Tuple3f from,
javax.vecmath.Tuple3f to,
float progress) |
static javax.vecmath.Vector4f |
lerp(javax.vecmath.Tuple4f from,
javax.vecmath.Tuple4f to,
float progress) |
static javax.vecmath.Matrix4f |
mul(javax.vecmath.Vector3f translation,
javax.vecmath.Quat4f leftRot,
javax.vecmath.Vector3f scale,
javax.vecmath.Quat4f rightRot) |
static javax.vecmath.Quat4f |
quatFromXYZ(float x,
float y,
float z) |
static javax.vecmath.Quat4f |
quatFromXYZ(javax.vecmath.Vector3f xyz) |
static javax.vecmath.Quat4f |
quatFromXYZDegrees(javax.vecmath.Vector3f xyz) |
static javax.vecmath.Quat4f |
quatFromYXZ(float y,
float x,
float z) |
EnumFacing |
rotate(EnumFacing facing) |
int |
rotate(EnumFacing facing,
int vertexIndex) |
static EnumFacing |
rotate(javax.vecmath.Matrix4f matrix,
EnumFacing facing) |
static javax.vecmath.Quat4f |
slerp(javax.vecmath.Quat4f from,
javax.vecmath.Quat4f to,
float progress) |
TRSRTransformation |
slerp(TRSRTransformation that,
float progress) |
static org.apache.commons.lang3.tuple.Triple<javax.vecmath.Quat4f,javax.vecmath.Vector3f,javax.vecmath.Quat4f> |
svdDecompose(javax.vecmath.Matrix3f m) |
static org.apache.commons.lang3.tuple.Pair<javax.vecmath.Matrix3f,javax.vecmath.Vector3f> |
toAffine(javax.vecmath.Matrix4f m) |
ItemTransformVec3f |
toItemTransform()
Deprecated.
|
static org.lwjgl.util.vector.Matrix4f |
toLwjgl(javax.vecmath.Matrix4f m) |
static org.lwjgl.util.vector.Vector3f |
toLwjgl(javax.vecmath.Vector3f vec) |
static org.lwjgl.util.vector.Vector4f |
toLwjgl(javax.vecmath.Vector4f vec) |
java.lang.String |
toString() |
static javax.vecmath.Matrix4f |
toVecmath(org.lwjgl.util.vector.Matrix4f m) |
static javax.vecmath.Vector3f |
toVecmath(org.lwjgl.util.vector.Vector3f vec) |
static javax.vecmath.Vector4f |
toVecmath(org.lwjgl.util.vector.Vector4f vec) |
static javax.vecmath.Vector3f |
toXYZ(javax.vecmath.Quat4f q) |
static javax.vecmath.Vector3f |
toXYZDegrees(javax.vecmath.Quat4f q) |
static javax.vecmath.Vector3f |
toYXZ(javax.vecmath.Quat4f q) |
static javax.vecmath.Vector3f |
toYXZDegrees(javax.vecmath.Quat4f q) |
public TRSRTransformation(javax.vecmath.Matrix4f matrix)
public TRSRTransformation(javax.vecmath.Vector3f translation, javax.vecmath.Quat4f leftRot, javax.vecmath.Vector3f scale, javax.vecmath.Quat4f rightRot)
@Deprecated public TRSRTransformation(ItemTransformVec3f transform)
public TRSRTransformation(ModelRotation rotation)
public TRSRTransformation(EnumFacing facing)
public static javax.vecmath.Matrix4f getMatrix(EnumFacing facing)
public static TRSRTransformation identity()
public TRSRTransformation compose(TRSRTransformation b)
public TRSRTransformation inverse()
public static javax.vecmath.Quat4f quatFromYXZ(float y, float x, float z)
public static javax.vecmath.Quat4f quatFromXYZDegrees(javax.vecmath.Vector3f xyz)
public static javax.vecmath.Quat4f quatFromXYZ(javax.vecmath.Vector3f xyz)
public static javax.vecmath.Quat4f quatFromXYZ(float x, float y, float z)
public static javax.vecmath.Vector3f toYXZDegrees(javax.vecmath.Quat4f q)
public static javax.vecmath.Vector3f toYXZ(javax.vecmath.Quat4f q)
public static javax.vecmath.Vector3f toXYZDegrees(javax.vecmath.Quat4f q)
public static javax.vecmath.Vector3f toXYZ(javax.vecmath.Quat4f q)
public static javax.vecmath.Matrix4f mul(javax.vecmath.Vector3f translation, javax.vecmath.Quat4f leftRot, javax.vecmath.Vector3f scale, javax.vecmath.Quat4f rightRot)
public static org.apache.commons.lang3.tuple.Triple<javax.vecmath.Quat4f,javax.vecmath.Vector3f,javax.vecmath.Quat4f> svdDecompose(javax.vecmath.Matrix3f m)
public static org.apache.commons.lang3.tuple.Pair<javax.vecmath.Matrix3f,javax.vecmath.Vector3f> toAffine(javax.vecmath.Matrix4f m)
@Deprecated public ItemTransformVec3f toItemTransform()
public javax.vecmath.Matrix4f getMatrix()
getMatrix
in interface ITransformation
public javax.vecmath.Vector3f getTranslation()
public javax.vecmath.Quat4f getLeftRot()
public javax.vecmath.Vector3f getScale()
public javax.vecmath.Quat4f getRightRot()
public com.google.common.base.Optional<TRSRTransformation> apply(com.google.common.base.Optional<? extends IModelPart> part)
apply
in interface IModelState
public EnumFacing rotate(EnumFacing facing)
rotate
in interface ITransformation
public static EnumFacing rotate(javax.vecmath.Matrix4f matrix, EnumFacing facing)
public static boolean isInteger(javax.vecmath.Matrix4f matrix)
public int rotate(EnumFacing facing, int vertexIndex)
rotate
in interface ITransformation
public java.lang.String toString()
toString
in class java.lang.Object
public static TRSRTransformation blockCenterToCorner(TRSRTransformation transform)
public static TRSRTransformation blockCornerToCenter(TRSRTransformation transform)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static javax.vecmath.Vector3f toVecmath(org.lwjgl.util.vector.Vector3f vec)
public static javax.vecmath.Vector4f toVecmath(org.lwjgl.util.vector.Vector4f vec)
public static javax.vecmath.Matrix4f toVecmath(org.lwjgl.util.vector.Matrix4f m)
public static org.lwjgl.util.vector.Vector3f toLwjgl(javax.vecmath.Vector3f vec)
public static org.lwjgl.util.vector.Vector4f toLwjgl(javax.vecmath.Vector4f vec)
public static org.lwjgl.util.vector.Matrix4f toLwjgl(javax.vecmath.Matrix4f m)
public static javax.vecmath.Vector3f lerp(javax.vecmath.Tuple3f from, javax.vecmath.Tuple3f to, float progress)
public static javax.vecmath.Vector4f lerp(javax.vecmath.Tuple4f from, javax.vecmath.Tuple4f to, float progress)
public static javax.vecmath.Quat4f slerp(javax.vecmath.Quat4f from, javax.vecmath.Quat4f to, float progress)
public TRSRTransformation slerp(TRSRTransformation that, float progress)
public static TRSRTransformation getVanillaUvTransformLocalToGlobal(EnumFacing side)
public static TRSRTransformation getVanillaUvTransformGlobalToLocal(EnumFacing side)
public TRSRTransformation getUVLockTransform(EnumFacing originalSide)