com.ardor3d.math.Transform.fromHomogeneousMatrix()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中com.ardor3d.math.Transform.fromHomogeneousMatrix()方法的一些代码示例,展示了Transform.fromHomogeneousMatrix()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transform.fromHomogeneousMatrix()方法的具体详情如下:
包路径:com.ardor3d.math.Transform
类名称:Transform
方法名:fromHomogeneousMatrix

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( //

相关文章