本文整理了Java中com.jogamp.opengl.math.Quaternion.getZ
方法的一些代码示例,展示了Quaternion.getZ
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quaternion.getZ
方法的具体详情如下:
包路径:com.jogamp.opengl.math.Quaternion
类名称:Quaternion
方法名:getZ
暂无
代码示例来源:origin: org.jogamp.jogl/jogl
/**
* @param o the object to compare for equality
* @return true if this quaternion and the provided quaternion have roughly the same x, y, z and w values.
*/
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Quaternion)) {
return false;
}
final Quaternion comp = (Quaternion) o;
return Math.abs(x - comp.getX()) <= ALLOWED_DEVIANCE &&
Math.abs(y - comp.getY()) <= ALLOWED_DEVIANCE &&
Math.abs(z - comp.getZ()) <= ALLOWED_DEVIANCE &&
Math.abs(w - comp.getW()) <= ALLOWED_DEVIANCE;
}
@Override
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
/**
* @param o the object to compare for equality
* @return true if this quaternion and the provided quaternion have roughly the same x, y, z and w values.
*/
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Quaternion)) {
return false;
}
final Quaternion comp = (Quaternion) o;
return Math.abs(x - comp.getX()) <= ALLOWED_DEVIANCE &&
Math.abs(y - comp.getY()) <= ALLOWED_DEVIANCE &&
Math.abs(z - comp.getZ()) <= ALLOWED_DEVIANCE &&
Math.abs(w - comp.getW()) <= ALLOWED_DEVIANCE;
}
@Override
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
/**
* @param o the object to compare for equality
* @return true if this quaternion and the provided quaternion have roughly the same x, y, z and w values.
*/
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Quaternion)) {
return false;
}
final Quaternion comp = (Quaternion) o;
return Math.abs(x - comp.getX()) <= ALLOWED_DEVIANCE &&
Math.abs(y - comp.getY()) <= ALLOWED_DEVIANCE &&
Math.abs(z - comp.getZ()) <= ALLOWED_DEVIANCE &&
Math.abs(w - comp.getW()) <= ALLOWED_DEVIANCE;
}
@Override
代码示例来源:origin: stackoverflow.com
public Quaternion multiply(Quaternion q) {
float rx = q.getX(), ry = q.getY(), rz = q.getZ(), rw = q.getW();
float cx = x; // cx = current X
float cy = y;
float cz = z;
float cw = w;
this.w = cw*rw - cx*rx - cy*ry - cz*rz;
this.x = cw*rx + cx*rw + cy*rz - cz*ry;
this.y = cw*ry - cx*rz + cy*rw + cz*rx;
this.z = cw*rz + cx*ry - cy*rx + cz*rw;
return this;
}
代码示例来源:origin: org.jogamp.jogl/jogl
/**
* Returns the dot product of this quaternion with the given quaternion
*/
public final float dot(final Quaternion quat) {
return dot(quat.getX(), quat.getY(), quat.getZ(), quat.getW());
}
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
/**
* Returns the dot product of this quaternion with the given quaternion
*/
public final float dot(final Quaternion quat) {
return dot(quat.getX(), quat.getY(), quat.getZ(), quat.getW());
}
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
/**
* Returns the dot product of this quaternion with the given quaternion
*/
public final float dot(final Quaternion quat) {
return dot(quat.getX(), quat.getY(), quat.getZ(), quat.getW());
}
内容来源于网络,如有侵权,请联系作者删除!