congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Vector3.normalized
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: google-ar/sceneform-android-sdk

 private static float calculateDeltaRotation(
   Vector3 currentPosition1,
   Vector3 currentPosition2,
   Vector3 previousPosition1,
   Vector3 previousPosition2) {
  Vector3 currentDirection = Vector3.subtract(currentPosition1, currentPosition2).normalized();
  Vector3 previousDirection = Vector3.subtract(previousPosition1, previousPosition2).normalized();
  float sign =
    Math.signum(
      previousDirection.x * currentDirection.y - previousDirection.y * currentDirection.x);
  return Vector3.angleBetweenVectors(currentDirection, previousDirection) * sign;
 }
}
origin: googlesamples/sceneform-samples

Vector3 normal = Vector3.subtract(centerPoint, nextPoint).normalized();
Vertex center =
  Vertex.builder()
origin: googlesamples/sceneform-samples

  lerp(rotations.get(segmentIndex), rotations.get(segmentIndex + 1), .5f);
Vector3 rightDirection =
  Quaternion.rotateVector(averagedRotation, Vector3.right()).normalized();
Vector3 upDirection = Quaternion.rotateVector(averagedRotation, Vector3.up()).normalized();
   Vector3.add(
     rightDirection.scaled(radius * cosTheta), upDirection.scaled(radius * sinTheta));
 Vector3 normal = position.normalized();
 position.set(Vector3.add(position, influencePoint));
origin: google-ar/sceneform-android-sdk

Vector3 firstToSecondDirection = firstToSecond.normalized();
previousPosition2.set(newPosition2);
float dot1 = Vector3.dot(deltaPosition1.normalized(), firstToSecondDirection.negated());
float dot2 = Vector3.dot(deltaPosition2.normalized(), firstToSecondDirection);
float dotThreshold = (float) Math.cos(Math.toRadians(SLOP_MOTION_DIRECTION_DEGREES));
origin: googlesamples/sceneform-samples

Vector3 directionFromTopToBottom = difference.normalized();
Quaternion rotationFromAToB = Quaternion.lookRotation(directionFromTopToBottom, desiredUp);
  Quaternion.rotateVector(rotationFromAToB, Vector3.forward()).normalized();
Vector3 rightDirection =
  Quaternion.rotateVector(rotationFromAToB, Vector3.right()).normalized();
Vector3 upDirection = Quaternion.rotateVector(rotationFromAToB, Vector3.up()).normalized();
desiredUp.set(upDirection);
       rightDirection.scaled(radius * cosTheta), upDirection.scaled(radius * sinTheta)));
 Vector3 normal =
   Vector3.subtract(topPosition, directionFromTopToBottom.scaled(-halfHeight)).normalized();
 topPosition = Vector3.add(topPosition, center);
 UvCoordinate uvCoordinate = new UvCoordinate(uStep * edgeIndex, 0);
 normal =
   Vector3.subtract(bottomPosition, directionFromTopToBottom.scaled(halfHeight))
     .normalized();
 bottomPosition = Vector3.add(bottomPosition, center);
 float vHeight = halfHeight * 2;
com.google.ar.sceneform.mathVector3normalized

Popular methods of Vector3

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

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Collectors (java.util.stream)
  • JComboBox (javax.swing)
  • JOptionPane (javax.swing)
  • Join (org.hibernate.mapping)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now