本文整理汇总了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;
}