本文整理了Java中com.jogamp.opengl.math.Quaternion.setFromMatrix
方法的一些代码示例,展示了Quaternion.setFromMatrix
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quaternion.setFromMatrix
方法的具体详情如下:
包路径:com.jogamp.opengl.math.Quaternion
类名称:Quaternion
方法名:setFromMatrix
[英]Compute the quaternion from a 3x3 column rotation matrix
See Graphics Gems Code,
MatrixTrace.
Buggy Matrix-FAQ Q55
[中]从3x3列旋转矩阵计算四元数
见Graphics Gems Code,
MatrixTrace.
马车Matrix-FAQ Q55
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
/**
* Initializes this quaternion to represent a rotation formed by the given three <i>orthogonal</i> axes.
* <p>
* No validation whether the axes are <i>orthogonal</i> is performed.
* </p>
*
* @param xAxis vector representing the <i>orthogonal</i> x-axis of the coordinate system.
* @param yAxis vector representing the <i>orthogonal</i> y-axis of the coordinate system.
* @param zAxis vector representing the <i>orthogonal</i> z-axis of the coordinate system.
* @return this quaternion for chaining.
*/
public final Quaternion setFromAxes(final float[] xAxis, final float[] yAxis, final float[] zAxis) {
return setFromMatrix(xAxis[0], yAxis[0], zAxis[0],
xAxis[1], yAxis[1], zAxis[1],
xAxis[2], yAxis[2], zAxis[2]);
}
代码示例来源:origin: org.jogamp.jogl/jogl
/**
* Initializes this quaternion to represent a rotation formed by the given three <i>orthogonal</i> axes.
* <p>
* No validation whether the axes are <i>orthogonal</i> is performed.
* </p>
*
* @param xAxis vector representing the <i>orthogonal</i> x-axis of the coordinate system.
* @param yAxis vector representing the <i>orthogonal</i> y-axis of the coordinate system.
* @param zAxis vector representing the <i>orthogonal</i> z-axis of the coordinate system.
* @return this quaternion for chaining.
*/
public final Quaternion setFromAxes(final float[] xAxis, final float[] yAxis, final float[] zAxis) {
return setFromMatrix(xAxis[0], yAxis[0], zAxis[0],
xAxis[1], yAxis[1], zAxis[1],
xAxis[2], yAxis[2], zAxis[2]);
}
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
/**
* Initializes this quaternion to represent a rotation formed by the given three <i>orthogonal</i> axes.
* <p>
* No validation whether the axes are <i>orthogonal</i> is performed.
* </p>
*
* @param xAxis vector representing the <i>orthogonal</i> x-axis of the coordinate system.
* @param yAxis vector representing the <i>orthogonal</i> y-axis of the coordinate system.
* @param zAxis vector representing the <i>orthogonal</i> z-axis of the coordinate system.
* @return this quaternion for chaining.
*/
public final Quaternion setFromAxes(final float[] xAxis, final float[] yAxis, final float[] zAxis) {
return setFromMatrix(xAxis[0], yAxis[0], zAxis[0],
xAxis[1], yAxis[1], zAxis[1],
xAxis[2], yAxis[2], zAxis[2]);
}
代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt
/**
* Initializes this quaternion from a 4x4 column rotation matrix
* <p>
* See <a href="ftp://ftp.cis.upenn.edu/pub/graphics/shoemake/quatut.ps.Z">Graphics Gems Code</a>,<br/>
* <a href="http://mathworld.wolfram.com/MatrixTrace.html">MatrixTrace</a>.
* </p>
* <p>
* Buggy <a href="http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55">Matrix-FAQ Q55</a>
* </p>
*
* @param m 4x4 column matrix
* @return this quaternion for chaining.
* @see #toMatrix(float[], int)
*/
public final Quaternion setFromMatrix(final float[] m, final int m_off) {
return setFromMatrix(m[0+0*4+m_off], m[0+1*4+m_off], m[0+2*4+m_off],
m[1+0*4+m_off], m[1+1*4+m_off], m[1+2*4+m_off],
m[2+0*4+m_off], m[2+1*4+m_off], m[2+2*4+m_off]);
}
代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub
/**
* Initializes this quaternion from a 4x4 column rotation matrix
* <p>
* See <a href="ftp://ftp.cis.upenn.edu/pub/graphics/shoemake/quatut.ps.Z">Graphics Gems Code</a>,<br/>
* <a href="http://mathworld.wolfram.com/MatrixTrace.html">MatrixTrace</a>.
* </p>
* <p>
* Buggy <a href="http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55">Matrix-FAQ Q55</a>
* </p>
*
* @param m 4x4 column matrix
* @return this quaternion for chaining.
* @see #toMatrix(float[], int)
*/
public final Quaternion setFromMatrix(final float[] m, final int m_off) {
return setFromMatrix(m[0+0*4+m_off], m[0+1*4+m_off], m[0+2*4+m_off],
m[1+0*4+m_off], m[1+1*4+m_off], m[1+2*4+m_off],
m[2+0*4+m_off], m[2+1*4+m_off], m[2+2*4+m_off]);
}
代码示例来源:origin: org.jogamp.jogl/jogl
/**
* Initializes this quaternion from a 4x4 column rotation matrix
* <p>
* See <a href="ftp://ftp.cis.upenn.edu/pub/graphics/shoemake/quatut.ps.Z">Graphics Gems Code</a>,<br/>
* <a href="http://mathworld.wolfram.com/MatrixTrace.html">MatrixTrace</a>.
* </p>
* <p>
* Buggy <a href="http://web.archive.org/web/20041029003853/http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q55">Matrix-FAQ Q55</a>
* </p>
*
* @param m 4x4 column matrix
* @return this quaternion for chaining.
* @see #toMatrix(float[], int)
*/
public final Quaternion setFromMatrix(final float[] m, final int m_off) {
return setFromMatrix(m[0+0*4+m_off], m[0+1*4+m_off], m[0+2*4+m_off],
m[1+0*4+m_off], m[1+1*4+m_off], m[1+2*4+m_off],
m[2+0*4+m_off], m[2+1*4+m_off], m[2+2*4+m_off]);
}
内容来源于网络,如有侵权,请联系作者删除!