本文整理了Java中us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics.setYawPitchRoll
方法的一些代码示例,展示了QuaternionBasics.setYawPitchRoll
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuaternionBasics.setYawPitchRoll
方法的具体详情如下:
包路径:us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics
类名称:QuaternionBasics
方法名:setYawPitchRoll
暂无
代码示例来源:origin: us.ihmc/euclid-geometry
/**
* Sets the orientation part of this pose 3D with the given yaw, pitch, and roll angles.
* <p>
* WARNING: the Euler angles or yaw-pitch-roll representation is sensitive to gimbal lock and is
* sometimes undefined.
* </p>
*
* @param yawPitchRoll array containing the yaw-pitch-roll angles. Not modified.
* @deprecated Use {@link #setOrientation(Orientation3DReadOnly)} with {@link YawPitchRoll} instead.
*/
default void setOrientationYawPitchRoll(double[] yawPitchRoll)
{
getOrientation().setYawPitchRoll(yawPitchRoll);
}
代码示例来源:origin: us.ihmc/euclid-geometry
/**
* Sets the orientation part of this pose 3D with the given yaw, pitch, and roll angles.
* <p>
* WARNING: the Euler angles or yaw-pitch-roll representation is sensitive to gimbal lock and is
* sometimes undefined.
* </p>
*
* @param yaw the angle to rotate about the z-axis.
* @param pitch the angle to rotate about the y-axis.
* @param roll the angle to rotate about the x-axis.
*/
default void setOrientationYawPitchRoll(double yaw, double pitch, double roll)
{
getOrientation().setYawPitchRoll(yaw, pitch, roll);
}
代码示例来源:origin: us.ihmc/euclid-test
@Test
public void testSetYawPitchRoll()
{
Random random = new Random(574631L);
T actualQuaternion = createEmptyTuple();
T expectedQuaternion = createEmptyTuple();
double[] yawPitchRoll;
for (int i = 0; i < ITERATIONS; i++)
{ // Test setYawPitchRoll(double[] yawPitchRoll)
yawPitchRoll = EuclidCoreRandomTools.nextYawPitchRollArray(random);
QuaternionConversion.convertYawPitchRollToQuaternion(yawPitchRoll, expectedQuaternion);
actualQuaternion.setYawPitchRoll(yawPitchRoll);
EuclidCoreTestTools.assertQuaternionEquals(expectedQuaternion, actualQuaternion, getEpsilon());
actualQuaternion.setToZero();
actualQuaternion.setYawPitchRoll(yawPitchRoll[0], yawPitchRoll[1], yawPitchRoll[2]);
EuclidCoreTestTools.assertQuaternionEquals(expectedQuaternion, actualQuaternion, getEpsilon());
}
}
内容来源于网络,如有侵权,请联系作者删除!