Codota Logo
Quaternion.distance
Code IndexAdd Codota to your IDE (free)

How to use
distance
method
in
us.ihmc.euclid.tuple4D.Quaternion

Best Java code snippets using us.ihmc.euclid.tuple4D.Quaternion.distance (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: us.ihmc/euclid-test

@Test
public void testDistance() throws Exception
{
 Random random = new Random(5321);
 for (int i = 0; i < ITERATIONS; i++)
 {
   YawPitchRoll firstYPR = EuclidCoreRandomTools.nextYawPitchRoll(random);
   YawPitchRoll secondYPR = EuclidCoreRandomTools.nextYawPitchRoll(random);
   Quaternion firstQ = new Quaternion(firstYPR);
   Quaternion secondQ = new Quaternion(secondYPR);
   assertEquals(firstQ.distance(secondQ), YawPitchRollTools.distance(firstYPR, secondYPR), EPSILON);
   assertEquals(firstQ.distance(secondQ), YawPitchRollTools.distance(firstYPR.getYaw(), firstYPR.getPitch(), firstYPR.getRoll(), secondYPR.getYaw(),
                                    secondYPR.getPitch(), secondYPR.getRoll()),
         EPSILON);
 }
}
origin: us.ihmc/euclid-test

@Test
public void testDistance() throws Exception
{
 Random random = new Random(32434L);
 for (int i = 0; i < ITERATIONS; i++)
 {
   AxisAngleReadOnly aa1 = createRandomAxisAngle(random);
   AxisAngleReadOnly aa2 = createRandomAxisAngle(random);
   Quaternion q1 = new Quaternion(aa1);
   Quaternion q2 = new Quaternion(aa2);
   double actualDistance = aa1.distance(aa2);
   double expectedDistance = q1.distance(q2);
   assertEquals(expectedDistance, actualDistance, getEpsilon());
   assertEquals(0.0, aa1.distance(aa1), getEpsilon());
 }
}
origin: us.ihmc/ihmc-manipulation-planning

public static double getDistance(RigidBodyTransform from, RigidBodyTransform to, double positionWeight, double orientationWeight)
{
 Point3D pointFrom = new Point3D(from.getTranslationVector());
 Quaternion orientationFrom = new Quaternion(from.getRotationMatrix());
 Point3D pointTo = new Point3D(to.getTranslationVector());
 Quaternion orientationTo = new Quaternion(to.getRotationMatrix());
 double positionDistance = positionWeight * pointFrom.distance(pointTo);
 double orientationDistance = orientationWeight * orientationFrom.distance(orientationTo);
 double distance = positionDistance + orientationDistance;
 return distance;
}
origin: us.ihmc/euclid-test

double expectedDistance = q1.distance(q2);
assertEquals(expectedDistance, actualDistance, EPSILON);
assertEquals(0.0, aa1.distance(aa1), EPSILON);
double expectedDistance = q1.distance(q2);
assertEquals(expectedDistance, actualDistance, EPSILON);
assertEquals(0.0, aa1.distance(aa1), EPSILON);
origin: us.ihmc/euclid-test

double expectedDistance = Math.abs(EuclidCoreTools.trimAngleMinusPiToPi(q1.distance(q2)));
assertEquals(expectedDistance, actualDistance, EPS);
assertEquals(0.0, RotationMatrixTools.distance(m1, m1), EPS);
us.ihmc.euclid.tuple4DQuaterniondistance

Popular methods of Quaternion

  • <init>
  • set
  • getS
  • getX
  • getY
  • getZ
  • multiply
  • setYawPitchRoll
  • getYaw
  • applyTransform
  • epsilonEquals
  • transform
  • epsilonEquals,
  • transform,
  • appendRollRotation,
  • equals,
  • get,
  • interpolate,
  • multiplyConjugateOther,
  • normalize,
  • setRotationVector,
  • appendPitchRotation

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • JFileChooser (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now