congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Vector3.lerp
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: google-ar/sceneform-android-sdk

private void updatePosition(FrameTime frameTime) {
 // Store in local variable for nullness static analysis.
 Vector3 desiredLocalPosition = this.desiredLocalPosition;
 if (desiredLocalPosition == null) {
  return;
 }
 Vector3 localPosition = getTransformableNode().getLocalPosition();
 float lerpFactor = MathHelper.clamp(frameTime.getDeltaSeconds() * LERP_SPEED, 0, 1);
 localPosition = Vector3.lerp(localPosition, desiredLocalPosition, lerpFactor);
 float lengthDiff = Math.abs(Vector3.subtract(desiredLocalPosition, localPosition).length());
 if (lengthDiff <= POSITION_LENGTH_THRESHOLD) {
  localPosition = desiredLocalPosition;
  this.desiredLocalPosition = null;
 }
 getTransformableNode().setLocalPosition(localPosition);
}
com.google.ar.sceneform.mathVector3lerp

Popular methods of Vector3

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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