本文整理了Java中com.jogamp.opengl.math.Quaternion.conjugate
方法的一些代码示例,展示了Quaternion.conjugate
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quaternion.conjugate
方法的具体详情如下:
包路径:com.jogamp.opengl.math.Quaternion
类名称:Quaternion
方法名:conjugate
[英]Conjugates this quaternion [-x, -y, -z, w]
.
[中]使这个四元数[$0$]共轭。
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
/**
* Invert the quaternion If rotational, will produce a the inverse rotation
* <p>
* Implementation Details:
* <ul>
* <li> {@link #conjugate() conjugates} if {@link #magnitudeSquared()} is is {@link FloatUtil#isEqual(float, float, float) equals 1f} using {@link FloatUtil#EPSILON epsilon}</li>
* </ul>
* </p>
* @return this quaternion for chaining.
* @see <a href="http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q50">Matrix-FAQ Q50</a>
*/
public final Quaternion invert() {
final float magnitudeSQ = magnitudeSquared();
if ( FloatUtil.isEqual(1.0f, magnitudeSQ, FloatUtil.EPSILON) ) {
conjugate();
} else {
final float invmsq = 1f/magnitudeSQ;
w *= invmsq;
x = -x * invmsq;
y = -y * invmsq;
z = -z * invmsq;
}
return this;
}
代码示例来源:origin: org.jogamp.jogl/jogl
/**
* Invert the quaternion If rotational, will produce a the inverse rotation
* <p>
* Implementation Details:
* <ul>
* <li> {@link #conjugate() conjugates} if {@link #magnitudeSquared()} is is {@link FloatUtil#isEqual(float, float, float) equals 1f} using {@link FloatUtil#EPSILON epsilon}</li>
* </ul>
* </p>
* @return this quaternion for chaining.
* @see <a href="http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q50">Matrix-FAQ Q50</a>
*/
public final Quaternion invert() {
final float magnitudeSQ = magnitudeSquared();
if ( FloatUtil.isEqual(1.0f, magnitudeSQ, FloatUtil.EPSILON) ) {
conjugate();
} else {
final float invmsq = 1f/magnitudeSQ;
w *= invmsq;
x = -x * invmsq;
y = -y * invmsq;
z = -z * invmsq;
}
return this;
}
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
/**
* Invert the quaternion If rotational, will produce a the inverse rotation
* <p>
* Implementation Details:
* <ul>
* <li> {@link #conjugate() conjugates} if {@link #magnitudeSquared()} is is {@link FloatUtil#isEqual(float, float, float) equals 1f} using {@link FloatUtil#EPSILON epsilon}</li>
* </ul>
* </p>
* @return this quaternion for chaining.
* @see <a href="http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q50">Matrix-FAQ Q50</a>
*/
public final Quaternion invert() {
final float magnitudeSQ = magnitudeSquared();
if ( FloatUtil.isEqual(1.0f, magnitudeSQ, FloatUtil.EPSILON) ) {
conjugate();
} else {
final float invmsq = 1f/magnitudeSQ;
w *= invmsq;
x = -x * invmsq;
y = -y * invmsq;
z = -z * invmsq;
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!