本文整理了Java中com.ardor3d.math.Quaternion.setZ
方法的一些代码示例,展示了Quaternion.setZ
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quaternion.setZ
方法的具体详情如下:
包路径:com.ardor3d.math.Quaternion
类名称:Quaternion
方法名:setZ
[英]Sets the z component of this quaternion to the given double value.
[中]将此四元数的z分量设置为给定的双精度值。
代码示例来源:origin: Renanse/Ardor3D
/**
* Sets the value of this quaternion to (x, y, z, w)
*
* @param x
* @param y
* @param z
* @param w
* @return this quaternion for chaining
*/
public Quaternion set(final double x, final double y, final double z, final double w) {
setX(x);
setY(y);
setZ(z);
setW(w);
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Sets the value of this quaternion to (x, y, z, w)
*
* @param x
* @param y
* @param z
* @param w
* @return this quaternion for chaining
*/
public Quaternion set(final double x, final double y, final double z, final double w) {
setX(x);
setY(y);
setZ(z);
setW(w);
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
@Override
public void read(final InputCapsule capsule) throws IOException {
setX(capsule.readDouble("x", 0));
setY(capsule.readDouble("y", 0));
setZ(capsule.readDouble("z", 0));
setW(capsule.readDouble("w", 1));
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void read(final InputCapsule capsule) throws IOException {
setX(capsule.readDouble("x", 0));
setY(capsule.readDouble("y", 0));
setZ(capsule.readDouble("z", 0));
setW(capsule.readDouble("w", 1));
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Multiplies each value of this quaternion by the given scalar value. The result is stored in this quaternion.
*
* @param scalar
* the quaternion to multiply this quaternion by.
* @return this quaternion for chaining.
*/
public Quaternion multiplyLocal(final double scalar) {
setX(getX() * scalar);
setY(getY() * scalar);
setZ(getZ() * scalar);
setW(getW() * scalar);
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Sets the value of this quaternion to the (x, y, z, w) values of the provided source quaternion.
*
* @param source
* @return this quaternion for chaining
* @throws NullPointerException
* if source is null.
*/
public Quaternion set(final ReadOnlyQuaternion source) {
setX(source.getX());
setY(source.getY());
setZ(source.getZ());
setW(source.getW());
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Multiplies each value of this quaternion by the given scalar value. The result is stored in this quaternion.
*
* @param scalar
* the quaternion to multiply this quaternion by.
* @return this quaternion for chaining.
*/
public Quaternion multiplyLocal(final double scalar) {
setX(getX() * scalar);
setY(getY() * scalar);
setZ(getZ() * scalar);
setW(getW() * scalar);
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Used with serialization. Not to be called manually.
*
* @param in
* ObjectInput
* @throws IOException
* @throws ClassNotFoundException
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
setX(in.readDouble());
setY(in.readDouble());
setZ(in.readDouble());
setW(in.readDouble());
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Sets the value of this quaternion to the (x, y, z, w) values of the provided source quaternion.
*
* @param source
* @return this quaternion for chaining
* @throws NullPointerException
* if source is null.
*/
public Quaternion set(final ReadOnlyQuaternion source) {
setX(source.getX());
setY(source.getY());
setZ(source.getZ());
setW(source.getW());
return this;
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Used with serialization. Not to be called manually.
*
* @param in
* ObjectInput
* @throws IOException
* @throws ClassNotFoundException
*/
@Override
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
setX(in.readDouble());
setY(in.readDouble());
setZ(in.readDouble());
setW(in.readDouble());
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Internally increments the fields of this quaternion with the field values of the given quaternion.
*
* @param quat
* @return this quaternion for chaining
*/
public Quaternion addLocal(final ReadOnlyQuaternion quat) {
setX(getX() + quat.getX());
setY(getY() + quat.getY());
setZ(getZ() + quat.getZ());
setW(getW() + quat.getW());
return this;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Internally decrements the fields of this quaternion by the field values of the given quaternion.
*
* @param quat
* @return this quaternion for chaining.
*/
public Quaternion subtractLocal(final ReadOnlyQuaternion quat) {
setX(getX() - quat.getX());
setY(getY() - quat.getY());
setZ(getZ() - quat.getZ());
setW(getW() - quat.getW());
return this;
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Internally increments the fields of this quaternion with the field values of the given quaternion.
*
* @param quat
* @return this quaternion for chaining
*/
public Quaternion addLocal(final ReadOnlyQuaternion quat) {
setX(getX() + quat.getX());
setY(getY() + quat.getY());
setZ(getZ() + quat.getZ());
setW(getW() + quat.getW());
return this;
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Internally decrements the fields of this quaternion by the field values of the given quaternion.
*
* @param quat
* @return this quaternion for chaining.
*/
public Quaternion subtractLocal(final ReadOnlyQuaternion quat) {
setX(getX() - quat.getX());
setY(getY() - quat.getY());
setZ(getZ() - quat.getZ());
setW(getW() - quat.getW());
return this;
}
代码示例来源:origin: Renanse/Ardor3D
assertTrue(quat1.getY() == Double.NEGATIVE_INFINITY);
quat1.setZ(1);
assertTrue(quat1.getZ() == 1.0);
quat1.setZ(Double.POSITIVE_INFINITY);
assertTrue(quat1.getZ() == Double.POSITIVE_INFINITY);
quat1.setZ(Double.NEGATIVE_INFINITY);
assertTrue(quat1.getZ() == Double.NEGATIVE_INFINITY);
代码示例来源:origin: Renanse/Ardor3D
assertFalse(quat.equals(comp));
assertFalse(quat.strictEquals(comp));
comp.setZ(2);
assertFalse(quat.equals(comp));
assertFalse(quat.strictEquals(comp));
内容来源于网络,如有侵权,请联系作者删除!