Codota Logo
Vector3.forward
Code IndexAdd Codota to your IDE (free)

How to use
forward
method
in
com.google.ar.sceneform.math.Vector3

Best Java code snippets using com.google.ar.sceneform.math.Vector3.forward (Showing top 2 results out of 315)

  • Common ways to obtain Vector3
private void myMethod () {
Vector3 v =
  • Codota IconVector3 vector32;Vector3 vector33;Vector3.subtract(vector32, vector33)
  • Smart code suggestions by Codota
}
origin: google-ar/sceneform-android-sdk

/**
 * When translating, the up direction of the node must match the up direction of the plane from
 * the hit result. However, we also need to make sure that the original forward direction of the
 * node is respected.
 */
private Quaternion calculateFinalDesiredLocalRotation(Quaternion desiredLocalRotation) {
 // Get a rotation just to the up direction.
 // Otherwise, the node will spin around as you rotate.
 Vector3 rotatedUp = Quaternion.rotateVector(desiredLocalRotation, Vector3.up());
 desiredLocalRotation = Quaternion.rotationBetweenVectors(Vector3.up(), rotatedUp);
 // Adjust the rotation to make sure the node maintains the same forward direction.
 Quaternion forwardInLocal =
   Quaternion.rotationBetweenVectors(Vector3.forward(), initialForwardInLocal);
 desiredLocalRotation = Quaternion.multiply(desiredLocalRotation, forwardInLocal);
 return desiredLocalRotation.normalized();
}
origin: googlesamples/sceneform-samples

  Quaternion.rotateVector(rotationFromAToB, Vector3.forward()).normalized();
Vector3 rightDirection =
  Quaternion.rotateVector(rotationFromAToB, Vector3.right()).normalized();
com.google.ar.sceneform.mathVector3forward

Popular methods of Vector3

  • <init>
  • up
  • set
  • subtract
  • length
  • normalized
  • add
  • angleBetweenVectors
  • cross
  • dot
  • equals
  • lerp
  • equals,
  • lerp,
  • negated,
  • right,
  • scaled,
  • zero

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
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