本文整理了Java中com.ardor3d.math.Transform.getHomogeneousMatrix()
方法的一些代码示例,展示了Transform.getHomogeneousMatrix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transform.getHomogeneousMatrix()
方法的具体详情如下:
包路径:com.ardor3d.math.Transform
类名称:Transform
方法名:getHomogeneousMatrix
暂无
代码示例来源: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: com.ardor3d/ardor3d-animation
temp.getHomogeneousMatrix(_matrixPalette[index]);
代码示例来源:origin: Renanse/Ardor3D
temp.getHomogeneousMatrix(_matrixPalette[index]);
代码示例来源:origin: Renanse/Ardor3D
trans.setTranslation(5, 10, 15);
final Matrix4 mat4 = trans.getHomogeneousMatrix(null);
assertEquals(new Matrix4( //
2 * Math.cos(a), 2 * 0, 2 * Math.sin(a), 5, //
trans2.getHomogeneousMatrix(mat4);
assertEquals(new Matrix4( //
2 * Math.cos(a), 2 * 0, 2 * Math.sin(a), 5, //
trans.setRotation(new Matrix3(0, 1, 2, 3, 4, 5, 6, 7, 8));
trans.setTranslation(10, 11, 12);
trans.getHomogeneousMatrix(mat4);
assertEquals(new Matrix4( //
0, 1, 2, 10, //
内容来源于网络,如有侵权,请联系作者删除!