本文整理匯總了Java中javax.vecmath.Matrix4f.invert方法的典型用法代碼示例。如果您正苦於以下問題:Java Matrix4f.invert方法的具體用法?Java Matrix4f.invert怎麽用?Java Matrix4f.invert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.vecmath.Matrix4f
的用法示例。
在下文中一共展示了Matrix4f.invert方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: MBJoint
import javax.vecmath.Matrix4f; //導入方法依賴的package包/類
public MBJoint(String name, BlockPart part)
{
this.name = name;
if(part.partRotation != null)
{
float x = 0, y = 0, z = 0;
switch(part.partRotation.axis)
{
case X:
x = 1;
case Y:
y = 1;
case Z:
z = 1;
}
Quat4f rotation = new Quat4f();
rotation.set(new AxisAngle4f(x, y, z, 0));
Matrix4f m = new TRSRTransformation(
TRSRTransformation.toVecmath(part.partRotation.origin),
rotation,
null,
null).getMatrix();
m.invert();
invBindPose = new TRSRTransformation(m);
}
else
{
invBindPose = TRSRTransformation.identity();
}
}
示例2: getInvBindPose
import javax.vecmath.Matrix4f; //導入方法依賴的package包/類
public TRSRTransformation getInvBindPose()
{
Matrix4f m = new TRSRTransformation(node.getPos(), node.getRot(), node.getScale(), null).getMatrix();
m.invert();
TRSRTransformation pose = new TRSRTransformation(m);
if(node.getParent() != null)
{
TRSRTransformation parent = new NodeJoint(node.getParent()).getInvBindPose();
pose = pose.compose(parent);
}
return pose;
}
示例3: inverse
import javax.vecmath.Matrix4f; //導入方法依賴的package包/類
public TRSRTransformation inverse()
{
if(this == identity) return this;
Matrix4f m = getMatrix();
m.invert();
return new TRSRTransformation(m);
}
示例4: rotateTowardsFace
import javax.vecmath.Matrix4f; //導入方法依賴的package包/類
/** Rotates towards the given face, from the specified face */
public static Matrix4f rotateTowardsFace(EnumFacing from, EnumFacing to) {
Matrix4f fromMatrix = new Matrix4f(rotateTowardsFace(from));
// Because we want to do the opposite of what this does
fromMatrix.invert();
Matrix4f toMatrix = rotateTowardsFace(to);
Matrix4f result = new Matrix4f(toMatrix);
result.mul(fromMatrix);
return result;
}