本文整理了Java中us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics.multiply
方法的一些代码示例,展示了QuaternionBasics.multiply
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuaternionBasics.multiply
方法的具体详情如下:
包路径:us.ihmc.euclid.tuple4D.interfaces.QuaternionBasics
类名称:QuaternionBasics
方法名:multiply
暂无
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
/**
* This computes the product: resultToPack = (q0^-1 q1)
*/
public void computeQuaternionDifference(QuaternionReadOnly q0, QuaternionReadOnly q1, QuaternionBasics resultToPack)
{
resultToPack.setAndConjugate(q0);
resultToPack.multiply(q1);
}
代码示例来源:origin: us.ihmc/euclid-test
@Test
public void testMultiplyConjugate()
{
Random random = new Random(65445L);
for (int i = 0; i < ITERATIONS; i++)
{
T qOther1 = createRandomTuple(random);
T qOther2 = createRandomTuple(random);
T qActual = createRandomTuple(random);
T qExpected = createEmptyTuple();
{ // Test multiplyConjugateThis(QuaternionReadOnly other)
qExpected.set(qOther1);
qExpected.conjugate();
qExpected.multiply(qOther2);
qActual.set(qOther1);
qActual.multiplyConjugateThis(qOther2);
EuclidCoreTestTools.assertQuaternionEquals(qActual, qExpected, getEpsilon());
}
{ // Test multiplyConjugateOther(QuaternionReadOnly other)
qExpected.set(qOther1);
T qOther2Conjugated = createEmptyTuple();
qOther2Conjugated.setAndConjugate(qOther2);
qExpected.multiply(qOther2Conjugated);
qActual.set(qOther1);
qActual.multiplyConjugateOther(qOther2);
EuclidCoreTestTools.assertQuaternionEquals(qActual, qExpected, getEpsilon());
}
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void inverseMultiply(QuaternionReadOnly q1, QuaternionReadOnly q2, QuaternionBasics resultToPack)
{
qInv.setAndConjugate(q1);
resultToPack.multiply(qInv, q2);
}
代码示例来源:origin: us.ihmc/euclid-frame
/**
* Multiplies this frame quaternion by {@code other}.
* <p>
* this = this * other
* </p>
*
* @param other the other frame quaternion to multiply this. Not modified.
* @throws ReferenceFrameMismatchException if {@code other} is not expressed in the same reference
* frame as {@code this}.
*/
default void multiply(FrameQuaternionReadOnly other)
{
checkReferenceFrameMatch(other);
QuaternionBasics.super.multiply(other);
}
代码示例来源:origin: us.ihmc/euclid-frame
/**
* Sets this frame quaternion to the multiplication of {@code q1} and {@code q2}.
* <p>
* this = q1 * q2
* </p>
*
* @param q1 the first frame quaternion in the multiplication. Not modified.
* @param q2 the second quaternion in the multiplication. Not modified.
* @throws ReferenceFrameMismatchException if {@code q1} is not expressed in the same reference
* frame as {@code this}.
*/
default void multiply(FrameQuaternionReadOnly q1, QuaternionReadOnly q2)
{
checkReferenceFrameMatch(q1);
QuaternionBasics.super.multiply(q1, q2);
}
代码示例来源:origin: us.ihmc/euclid-frame
/**
* Sets this frame quaternion to the multiplication of {@code q1} and {@code q2}.
* <p>
* this = q1 * q2
* </p>
*
* @param q1 the first quaternion in the multiplication. Not modified.
* @param q2 the second frame quaternion in the multiplication. Not modified.
* @throws ReferenceFrameMismatchException if {@code q2} is not expressed in the same reference
* frame as {@code this}.
*/
default void multiply(QuaternionReadOnly q1, FrameQuaternionReadOnly q2)
{
checkReferenceFrameMatch(q2);
QuaternionBasics.super.multiply(q1, q2);
}
代码示例来源:origin: us.ihmc/euclid-frame
/**
* Sets this frame quaternion to the multiplication of {@code q1} and {@code q2}.
* <p>
* this = q1 * q2
* </p>
*
* @param q1 the first frame quaternion in the multiplication. Not modified.
* @param q2 the second frame quaternion in the multiplication. Not modified.
* @throws ReferenceFrameMismatchException if either {@code q1} or {@code q2} is not expressed in
* the same frame as {@code this}.
*/
default void multiply(FrameQuaternionReadOnly q1, FrameQuaternionReadOnly q2)
{
checkReferenceFrameMatch(q1);
checkReferenceFrameMatch(q2);
QuaternionBasics.super.multiply(q1, q2);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public void interpolate(double alpha, QuaternionReadOnly q0, QuaternionReadOnly q1, QuaternionBasics qInterpolatedToPack, boolean preventExtraSpin)
{
tempQ1ForInterpolation.set(q1);
if (preventExtraSpin && q0.dot(tempQ1ForInterpolation) < 0.0)
{
tempQ1ForInterpolation.negate();
}
computeQuaternionDifference(q0, tempQ1ForInterpolation, qInterpolatedToPack);
pow(qInterpolatedToPack, alpha, qInterpolatedToPack);
qInterpolatedToPack.multiply(q0, qInterpolatedToPack);
}
代码示例来源:origin: us.ihmc/euclid-geometry
/**
* Appends the given {@code transform} to this pose 3D.
*
* @param transform the quaternion-based transform to append to this pose 3D. Not modified.
*/
default void appendTransform(QuaternionBasedTransform transform)
{
QuaternionTools.addTransform(getOrientation(), transform.getTranslationVector(), getPosition());
getOrientation().multiply(transform.getQuaternion());
}
代码示例来源:origin: us.ihmc/euclid-test
@Test
public void testMultiply()
{
Random random = new Random(65445L);
for (int i = 0; i < ITERATIONS; i++)
{
T qOther1 = createRandomTuple(random);
T qOther2 = createRandomTuple(random);
T qActual = createRandomTuple(random);
T qExpected = createEmptyTuple();
{ // Test multiply(QuaternionBasics other)
qActual.set(qOther1);
qExpected.set(qOther1);
qActual.multiply(qOther2);
QuaternionTools.multiply(qExpected, qOther2, qExpected);
EuclidCoreTestTools.assertQuaternionEquals(qActual, qExpected, getEpsilon());
}
{ // Test multiply(QuaternionBasics q1, QuaternionBasics q2)
qActual.multiply(qOther1, qOther2);
QuaternionTools.multiply(qOther1, qOther2, qExpected);
EuclidCoreTestTools.assertQuaternionEquals(qActual, qExpected, getEpsilon());
}
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
errorToPack.multiply(orientation);
errorToPack.preMultiplyConjugateOther(orientation);
代码示例来源:origin: us.ihmc/euclid-test
axisAngleDiff.setAngle(axisAngleDiff.getAngle() * alpha);
qDiff.set(axisAngleDiff);
qExpected.multiply(q0, qDiff);
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
qProductDDot.add(qDDot3);
q.multiply(q0, qProduct);
QuaternionTools.multiply(q0, qProductDot, qDot);
QuaternionTools.multiply(q0, qProductDDot, qDDot);
内容来源于网络,如有侵权,请联系作者删除!