本文整理了Java中com.ardor3d.math.Transform.fromHomogeneousMatrix()
方法的一些代码示例,展示了Transform.fromHomogeneousMatrix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transform.fromHomogeneousMatrix()
方法的具体详情如下:
包路径:com.ardor3d.math.Transform
类名称:Transform
方法名:fromHomogeneousMatrix
[英]Reads in a 4x4 matrix as a 3x3 matrix and translation.
[中]将4x4矩阵读入3x3矩阵并进行翻译。
代码示例来源:origin: com.ardor3d/ardor3d-math
@Override
public Transform fromHomogeneousMatrix(final ReadOnlyMatrix4 matrix) {
super.fromHomogeneousMatrix(matrix);
validate();
return this;
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public Transform fromHomogeneousMatrix(final ReadOnlyMatrix4 matrix) {
super.fromHomogeneousMatrix(matrix);
validate();
return this;
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public ResultSample doTransformMultTest(final int count, final int maxCount, final long timeOutMS) {
final ReadOnlyMatrix4 m1 = new Matrix4().fromAngleAxis(MathUtils.nextRandomDouble(),
new Vector3(MathUtils.nextRandomDouble(), MathUtils.nextRandomDouble(), MathUtils.nextRandomDouble()));
final ReadOnlyMatrix4 m2 = new Matrix4().fromAngleAxis(MathUtils.nextRandomDouble(),
new Vector3(MathUtils.nextRandomDouble(), MathUtils.nextRandomDouble(), MathUtils.nextRandomDouble()));
final Transform a = new Transform().fromHomogeneousMatrix(m1);
final Transform b = new Transform();
final Transform by = new Transform().fromHomogeneousMatrix(m2);
final long start = System.currentTimeMillis();
int loopCount = 0;
while (System.currentTimeMillis() - start < timeOutMS && loopCount != maxCount) {
++loopCount;
for (int i = 0; i < count; ++i) {
if (i % 2 == 0) {
a.multiply(by, b);
} else {
b.multiply(by, a);
}
}
}
return populateResult(System.currentTimeMillis() - start, loopCount, a.getHomogeneousMatrix(null).toArray(null));
}
代码示例来源:origin: Renanse/Ardor3D
return new Transform().fromHomogeneousMatrix(finalMat);
代码示例来源:origin: Renanse/Ardor3D
source.flip();
final Matrix4 mat = new Matrix4().fromFloatBuffer(source);
bindMatrices.add(new Transform().fromHomogeneousMatrix(mat));
if (bindShapeMatrixEL != null) {
final double[] array = _colladaDOMUtil.parseDoubleArray(bindShapeMatrixEL);
bindShapeMatrix.fromHomogeneousMatrix(new Matrix4().fromArray(array));
代码示例来源:origin: Renanse/Ardor3D
return new Transform().fromHomogeneousMatrix(finalMat);
代码示例来源:origin: Renanse/Ardor3D
0, 0, 0, 1), mat4);
trans2.fromHomogeneousMatrix(mat4);
trans2.getHomogeneousMatrix(mat4);
assertEquals(new Matrix4( //
内容来源于网络,如有侵权,请联系作者删除!