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

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

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

QuaternionBasics.interpolate介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Performs a linear interpolation in SO(3) from {@code q0} to {@code qf} given the percentage
* {@code alpha}.
* <p>
* The interpolation method used here is often called a <i>Spherical Linear Interpolation</i> or
* SLERP.
* </p>
*
* @param q0 the first quaternion used in the interpolation. Not modified.
* @param qf the second frame quaternion used in the interpolation. Not modified.
* @param alpha the percentage to use for the interpolation. A value of 0 will result in setting
*           this frame quaternion to {@code q0}, while a value of 1 is equivalent to setting this
*           frame quaternion to {@code qf}.
* @throws ReferenceFrameMismatchException if {@code qf} is not expressed in the same reference
*            frame as {@code this}.
*/
default void interpolate(QuaternionReadOnly q0, FrameQuaternionReadOnly qf, double alpha)
{
 checkReferenceFrameMatch(qf);
 QuaternionBasics.super.interpolate(q0, qf, alpha);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Performs a linear interpolation in SO(3) from {@code q0} to {@code qf} given the percentage
* {@code alpha}.
* <p>
* The interpolation method used here is often called a <i>Spherical Linear Interpolation</i> or
* SLERP.
* </p>
*
* @param q0 the first frame quaternion used in the interpolation. Not modified.
* @param qf the second quaternion used in the interpolation. Not modified.
* @param alpha the percentage to use for the interpolation. A value of 0 will result in setting
*           this frame quaternion to {@code q0}, while a value of 1 is equivalent to setting this
*           frame quaternion to {@code qf}.
* @throws ReferenceFrameMismatchException if {@code q0} is not expressed in the same reference
*            frame as {@code this}.
*/
default void interpolate(FrameQuaternionReadOnly q0, QuaternionReadOnly qf, double alpha)
{
 checkReferenceFrameMatch(q0);
 QuaternionBasics.super.interpolate(q0, qf, alpha);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Performs a linear interpolation in SO(3) from {@code this} to {@code qf} given the percentage
* {@code alpha}.
* <p>
* The interpolation method used here is often called a <i>Spherical Linear Interpolation</i> or
* SLERP.
* </p>
*
* @param qf the other frame quaternion used for the interpolation. Not modified.
* @param alpha the percentage used for the interpolation. A value of 0 will result in not modifying
*           this frame quaternion, while a value of 1 is equivalent to setting this frame
*           quaternion to {@code qf}.
* @throws ReferenceFrameMismatchException if {@code qf} is not expressed in the same reference
*            frame as {@code this}.
*/
default void interpolate(FrameQuaternionReadOnly qf, double alpha)
{
 checkReferenceFrameMatch(qf);
 QuaternionBasics.super.interpolate(qf, alpha);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Performs a linear interpolation in SO(3) from {@code q0} to {@code qf} given the percentage
* {@code alpha}.
* <p>
* The interpolation method used here is often called a <i>Spherical Linear Interpolation</i> or
* SLERP.
* </p>
*
* @param q0 the first quaternion used in the interpolation. Not modified.
* @param qf the second quaternion used in the interpolation. Not modified.
* @param alpha the percentage to use for the interpolation. A value of 0 will result in setting
*           this quaternion to {@code q0}, while a value of 1 is equivalent to setting this
*           quaternion to {@code qf}.
* @throws ReferenceFrameMismatchException if either {@code q0} or {@code qf} is not expressed in
*            the same frame as {@code this}.
*/
default void interpolate(FrameQuaternionReadOnly q0, FrameQuaternionReadOnly qf, double alpha)
{
 checkReferenceFrameMatch(q0);
 checkReferenceFrameMatch(qf);
 QuaternionBasics.super.interpolate(q0, qf, alpha);
}

代码示例来源:origin: us.ihmc/euclid-geometry

/**
* Performs a linear interpolation from {@code this} to {@code other} given the percentage
* {@code alpha}.
* <p>
* this.position = (1.0 - alpha) * this.position + alpha * other.position<br>
* this.orientation = (1.0 - alpha) * this.orientation + alpha * other.orientation
* </p>
*
* @param other the other pose 3D used for the interpolation. Not modified.
* @param alpha the percentage used for the interpolation. A value of 0 will result in not modifying
*           {@code this}, while a value of 1 is equivalent to setting {@code this} to
*           {@code other}.
*/
default void interpolate(Pose3DReadOnly other, double alpha)
{
 getPosition().interpolate(other.getPosition(), alpha);
 getOrientation().interpolate(other.getOrientation(), alpha);
}

代码示例来源:origin: us.ihmc/euclid-geometry

/**
* Performs a linear interpolation from {@code pose1} to {@code pose2} given the percentage
* {@code alpha}.
* <p>
* this.position = (1.0 - alpha) * pose1.position + alpha * pose2.position<br>
* this.orientation = (1.0 - alpha) * pose1.orientation + alpha * pose2.orientation
* </p>
*
* @param pose1 the first pose 3D used in the interpolation. Not modified.
* @param pose2 the second pose 3D used in the interpolation. Not modified.
* @param alpha the percentage to use for the interpolation. A value of 0 will result in setting
*           {@code this} to {@code pose1}, while a value of 1 is equivalent to setting {@code this}
*           to {@code pose2}.
*/
default void interpolate(Pose3DReadOnly pose1, Pose3DReadOnly pose2, double alpha)
{
 getPosition().interpolate(pose1.getPosition(), pose2.getPosition(), alpha);
 getOrientation().interpolate(pose1.getOrientation(), pose2.getOrientation(), alpha);
}

代码示例来源:origin: us.ihmc/euclid-test

qActual.interpolate(q0, qf, alpha);
qExpected.setToZero();
EuclidCoreTestTools.assertQuaternionEquals(qExpected, qActual, epsilon);
qActual.interpolate(qf, alpha);
qExpected.setToZero();
EuclidCoreTestTools.assertQuaternionEquals(qExpected, qActual, epsilon);
qf.set(q0);
double alpha = EuclidCoreRandomTools.nextDouble(random, 10.0);
qActual.interpolate(q0, qf, alpha);
qExpected.set(q0);
EuclidCoreTestTools.assertQuaternionEquals(qExpected, qActual, epsilon);
qActual.interpolate(qf, alpha);
qExpected.set(q0);
EuclidCoreTestTools.assertQuaternionEquals(qExpected, qActual, epsilon);
qActual.interpolate(q0, qf, alpha);
EuclidCoreTestTools.assertQuaternionEquals(qExpected, qActual, epsilon);
qActual.interpolate(qf, alpha);
EuclidCoreTestTools.assertQuaternionEquals(qExpected, qActual, epsilon);
qf = createRandomTuple(random);
double alpha = EuclidCoreRandomTools.nextDouble(random, 0.0, 1.0);
qExpected.interpolate(q0, qf, alpha);
qActual.interpolate(qf, q0, 1.0 - alpha);
EuclidCoreTestTools.assertQuaternionGeometricallyEquals(qExpected, qActual, epsilon);

相关文章