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

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

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

Transform.isRotationMatrix介绍

暂无

代码示例

代码示例来源:origin: com.ardor3d/ardor3d-math

final ReadOnlyMatrix3 matrixA = isRotationMatrix() ? _matrix.multiplyDiagonalPost(_scale,
    Matrix3.fetchTempInstance()) : _matrix;
matrixA.applyPost(transformBy.getTranslation(), newTranslate).addLocal(getTranslation());
if (isRotationMatrix()) {
  Matrix3.releaseTempInstance((Matrix3) matrixA);

代码示例来源:origin: Renanse/Ardor3D

@Test
public void testMultiply() {
  final Transform trans1 = new Transform();
  final Transform trans2 = new Transform();
  assertEquals(Transform.IDENTITY, trans1.multiply(trans2, null));
  trans1.setTranslation(1, 2, 3);
  final Transform trans3 = trans1.multiply(trans2, null);
  assertEquals(trans1, trans3);
  trans2.setTranslation(-1, -2, -3);
  trans1.multiply(trans2, trans3);
  assertEquals(Transform.IDENTITY, trans3);
  assertTrue(trans3.isRotationMatrix());
  assertTrue(trans3.isIdentity());
  assertTrue(trans3.isUniformScale());
  trans2.setScale(1, 2, 1);
  trans1.multiply(trans2, trans3);
  assertEquals(new Transform().setScale(1, 2, 1), trans3);
  assertTrue(trans3.isRotationMatrix());
  assertFalse(trans3.isIdentity());
  assertFalse(trans3.isUniformScale());
  trans1.setScale(1, 2, 1);
  trans1.multiply(trans2, trans3);
  assertEquals(new Transform().setRotation(new Matrix3(1, 0, 0, 0, 4, 0, 0, 0, 1)).setTranslation(0, -2, 0),
      trans3);
  assertFalse(trans3.isRotationMatrix());
  assertFalse(trans3.isIdentity());
  assertFalse(trans3.isUniformScale());
}

代码示例来源:origin: Renanse/Ardor3D

final ReadOnlyMatrix3 matrixA = isRotationMatrix()
    ? _matrix.multiplyDiagonalPost(_scale, Matrix3.fetchTempInstance())
    : _matrix;
matrixA.applyPost(transformBy.getTranslation(), newTranslate).addLocal(getTranslation());
if (isRotationMatrix()) {
  Matrix3.releaseTempInstance((Matrix3) matrixA);

代码示例来源:origin: Renanse/Ardor3D

-1, -2), new Vector3(1, 2, 3), true, true, true);
assertTrue(true == immutable.isIdentity());
assertTrue(true == immutable.isRotationMatrix());
assertTrue(true == immutable.isUniformScale());
assertEquals(new Matrix3().applyRotationX(MathUtils.QUARTER_PI), immutable.getMatrix());

相关文章