本文整理了Java中com.ardor3d.math.Transform.setIdentity()
方法的一些代码示例,展示了Transform.setIdentity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transform.setIdentity()
方法的具体详情如下:
包路径:com.ardor3d.math.Transform
类名称:Transform
方法名:setIdentity
[英]Resets this transform to identity and resets all flags.
[中]将此转换重置为标识并重置所有标志。
代码示例来源:origin: com.ardor3d/ardor3d-animation
public void applyTo(final Transform transform) {
transform.setIdentity();
transform.setRotation(getRotation());
transform.setScale(getScale());
transform.setTranslation(getTranslation());
}
代码示例来源:origin: Renanse/Ardor3D
public void applyTo(final Transform transform) {
transform.setIdentity();
transform.setRotation(getRotation());
transform.setScale(getScale());
transform.setTranslation(getTranslation());
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Copies the given transform values into this transform object.
*
* @param source
* @return this transform for chaining.
* @throws NullPointerException
* if source is null.
*/
public Transform set(final ReadOnlyTransform source) {
if (source.isIdentity()) {
setIdentity();
} else {
_matrix.set(source.getMatrix());
_scale.set(source.getScale());
_translation.set(source.getTranslation());
_identity = false;
_rotationMatrix = source.isRotationMatrix();
_uniformScale = source.isUniformScale();
}
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Copies the given transform values into this transform object.
*
* @param source
* @return this transform for chaining.
* @throws NullPointerException
* if source is null.
*/
public Transform set(final ReadOnlyTransform source) {
if (source.isIdentity()) {
setIdentity();
} else {
_matrix.set(source.getMatrix());
_scale.set(source.getScale());
_translation.set(source.getTranslation());
_identity = false;
_rotationMatrix = source.isRotationMatrix();
_uniformScale = source.isUniformScale();
}
return this;
}
代码示例来源:origin: Renanse/Ardor3D
result.setIdentity();
return result;
代码示例来源:origin: com.ardor3d/ardor3d-math
result.setIdentity();
return result;
代码示例来源:origin: Renanse/Ardor3D
@Test
public void testInvert() {
final Transform trans1 = new Transform();
trans1.setRotation(new Matrix3().applyRotationZ(3 * MathUtils.QUARTER_PI));
final Transform trans2 = trans1.invert(null);
assertEquals(Transform.IDENTITY, trans1.multiply(trans2, null));
trans1.setIdentity().invert(trans1);
assertEquals(Transform.IDENTITY, trans1);
}
代码示例来源:origin: Renanse/Ardor3D
assertEquals(trans2, trans);
trans.setIdentity();
assertEquals(Transform.IDENTITY, trans);
assertEquals(new Vector3(-10, 50, -30), trans.getTranslation());
trans.setIdentity();
trans.setRotation(new Matrix3().fromAngleAxis(a, Vector3.UNIT_Y));
trans.setScale(2, 3, 4);
0, 0, 0, 1), mat4);
trans.setIdentity();
trans.setRotation(new Matrix3(0, 1, 2, 3, 4, 5, 6, 7, 8));
trans.setTranslation(10, 11, 12);
代码示例来源:origin: Renanse/Ardor3D
trans.setIdentity();
trans.applyForward(vec3);
assertEquals(orig, vec3);
代码示例来源:origin: com.ardor3d/ardor3d-effects
t.setIdentity();
t.setTranslation(getWorldTranslation());
t.setScale(getScale());
代码示例来源:origin: Renanse/Ardor3D
t.setIdentity();
t.setTranslation(getWorldTranslation());
t.setScale(getScale());
代码示例来源:origin: Renanse/Ardor3D
final Transform trans = new Transform();
assertTrue(Transform.isValid(trans));
trans.setIdentity();
trans.setRotation(new Matrix3(Double.NaN, 0, 0, 0, 0, 0, 0, 0, 0));
assertFalse(Transform.isValid(trans));
trans.setIdentity();
trans.setScale(Double.NaN, 0, 0);
assertFalse(Transform.isValid(trans));
trans.setScale(Double.NaN);
assertFalse(Transform.isValid(trans));
trans.setIdentity();
trans.setTranslation(Double.NaN, 0, 0);
assertFalse(Transform.isValid(trans));
trans.setIdentity();
assertTrue(Transform.isValid(trans));
内容来源于网络,如有侵权,请联系作者删除!