本文整理了Java中com.ardor3d.math.Quaternion.getY
方法的一些代码示例,展示了Quaternion.getY
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quaternion.getY
方法的具体详情如下:
包路径:com.ardor3d.math.Quaternion
类名称:Quaternion
方法名:getY
暂无
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* @param x
* @param y
* @param z
* @param w
* @return the dot product of this quaternion with the given x,y,z and w values.
*/
@Override
public double dot(final double x, final double y, final double z, final double w) {
return getX() * x + getY() * y + getZ() * z + getW() * w;
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* @return the string representation of this quaternion.
*/
@Override
public String toString() {
return "com.ardor3d.math.Quaternion [X=" + getX() + ", Y=" + getY() + ", Z=" + getZ() + ", W=" + getW() + "]";
}
代码示例来源:origin: Renanse/Ardor3D
/**
* @param x
* @param y
* @param z
* @param w
* @return the dot product of this quaternion with the given x,y,z and w values.
*/
@Override
public double dot(final double x, final double y, final double z, final double w) {
return getX() * x + getY() * y + getZ() * z + getW() * w;
}
代码示例来源:origin: Renanse/Ardor3D
/**
* @return the squared magnitude of this quaternion.
*/
@Override
public double magnitudeSquared() {
return getW() * getW() + getX() * getX() + getY() * getY() + getZ() * getZ();
}
代码示例来源:origin: Renanse/Ardor3D
/**
* @return the string representation of this quaternion.
*/
@Override
public String toString() {
return "com.ardor3d.math.Quaternion [X=" + getX() + ", Y=" + getY() + ", Z=" + getZ() + ", W=" + getW() + "]";
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* @return the squared magnitude of this quaternion.
*/
@Override
public double magnitudeSquared() {
return getW() * getW() + getX() * getX() + getY() * getY() + getZ() * getZ();
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Internally sets this quaternion to its conjugate <code>[-x, -y, -z, w]</code>.
*
* @return this <code>Quaternion</code> for chaining.
*/
public Quaternion conjugateLocal() {
return set(-getX(), -getY(), -getZ(), getW());
}
代码示例来源:origin: Renanse/Ardor3D
/**
* Internally sets this quaternion to its conjugate <code>[-x, -y, -z, w]</code>.
*
* @return this <code>Quaternion</code> for chaining.
*/
public Quaternion conjugateLocal() {
return set(-getX(), -getY(), -getZ(), getW());
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* @return this quaternion, modified to be unit length, for chaining.
*/
public Quaternion normalizeLocal() {
final double n = 1.0 / magnitude();
final double x = getX() * n;
final double y = getY() * n;
final double z = getZ() * n;
final double w = getW() * n;
return set(x, y, z, w);
}
代码示例来源:origin: Renanse/Ardor3D
/**
* @return this quaternion, modified to be unit length, for chaining.
*/
public Quaternion normalizeLocal() {
final double n = 1.0 / magnitude();
final double x = getX() * n;
final double y = getY() * n;
final double z = getZ() * n;
final double w = getW() * n;
return set(x, y, z, w);
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Creates a new quaternion that is the conjugate <code>[-x, -y, -z, w]</code> of this quaternion.
*
* @param store
* the <code>Quaternion</code> to store the result in. If <code>null</code>, a new one is created.
* @return the conjugate to this quaternion.
*/
@Override
public Quaternion conjugate(Quaternion store) {
if (store == null) {
store = new Quaternion();
}
return store.set(-getX(), -getY(), -getZ(), getW());
}
代码示例来源:origin: com.ardor3d/ardor3d-math
@Override
public void write(final OutputCapsule capsule) throws IOException {
capsule.write(getX(), "x", 0);
capsule.write(getY(), "y", 0);
capsule.write(getZ(), "z", 0);
capsule.write(getW(), "w", 1);
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public void write(final OutputCapsule capsule) throws IOException {
capsule.write(getX(), "x", 0);
capsule.write(getY(), "y", 0);
capsule.write(getZ(), "z", 0);
capsule.write(getW(), "w", 1);
}
代码示例来源:origin: com.ardor3d/ardor3d-math
/**
* Used with serialization. Not to be called manually.
*
* @param out
* ObjectOutput
* @throws IOException
*/
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
out.writeDouble(getX());
out.writeDouble(getY());
out.writeDouble(getZ());
out.writeDouble(getW());
}
代码示例来源: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
/**
* @param quat
* @param store
* the Quaternion to store the result in. if null, a new one is created.
* @return a quaternion representing the fields of this quaternion subtracted from those of the given quaternion.
*/
@Override
public Quaternion subtract(final ReadOnlyQuaternion quat, final Quaternion store) {
Quaternion result = store;
if (result == null) {
result = new Quaternion();
}
return result.set(getX() - quat.getX(), getY() - quat.getY(), getZ() - quat.getZ(), getW() - quat.getW());
}
代码示例来源: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: 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: 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;
}
内容来源于网络,如有侵权,请联系作者删除!