us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics.setYawPitchRoll()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics.setYawPitchRoll方法的一些代码示例,展示了QuaternionBasics.setYawPitchRoll的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuaternionBasics.setYawPitchRoll方法的具体详情如下:
包路径:us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics
类名称:QuaternionBasics
方法名:setYawPitchRoll

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());
 }
}

相关文章