Codota Logo
Vector4.lerpLocal
Code IndexAdd Codota to your IDE (free)

How to use
lerpLocal
method
in
com.ardor3d.math.Vector4

Best Java code snippets using com.ardor3d.math.Vector4.lerpLocal (Showing top 3 results out of 315)

  • Common ways to obtain Vector4
private void myMethod () {
Vector4 v =
  • Codota Iconnew Vector4()
  • Codota IconVector4.fetchTempInstance()
  • Codota IconReadOnlyVector4 src;new Vector4(src)
  • Smart code suggestions by Codota
}
origin: Renanse/Ardor3D

@Test
public void testLerp() {
  final Vector4 vec1 = new Vector4(8, 3, -2, 2);
  final Vector4 vec2 = new Vector4(2, 1, 0, -2);
  assertEquals(new Vector4(5, 2, -1, 0), vec1.lerp(vec2, 0.5, null));
  assertEquals(new Vector4(5, 2, -1, 0), vec1.lerp(vec2, 0.5, new Vector4()));
  assertEquals(new Vector4(5, 2, -1, 0), Vector4.lerp(vec1, vec2, 0.5, null));
  assertEquals(new Vector4(5, 2, -1, 0), Vector4.lerp(vec1, vec2, 0.5, new Vector4()));
  vec1.set(14, 5, 4, 2);
  vec1.lerpLocal(vec2, 0.25);
  assertEquals(new Vector4(11, 4, 3, 1), vec1);
  vec1.set(15, 7, 6, 8);
  final Vector4 vec3 = new Vector4(-1, -1, -1, -1);
  vec3.lerpLocal(vec1, vec2, 0.5);
  assertEquals(new Vector4(8.5, 4.0, 3.0, 3.0), vec3);
  // coverage
  assertEquals(vec1.lerp(vec1, .25, null), vec1);
  assertEquals(vec2.lerpLocal(vec2, .25), vec2);
  assertEquals(vec2.lerpLocal(vec2, vec2, .25), vec2);
  assertEquals(Vector4.lerp(vec1, vec1, .25, null), vec1);
}
origin: com.ardor3d/ardor3d-effects

for (int y = smallerFrom; y < biggerTo; y++) {
  for (int x = 0; x < sizeX; x++) {
    pointTop.lerpLocal(intersectTopLeft, intersectTopRight, u);
    pointBottom.lerpLocal(intersectBottomLeft, intersectBottomRight, u);
    pointFinal.lerpLocal(pointTop, pointBottom, v);
origin: Renanse/Ardor3D

for (int y = smallerFrom; y < biggerTo; y++) {
  for (int x = 0; x < sizeX; x++) {
    pointTop.lerpLocal(intersectTopLeft, intersectTopRight, u);
    pointBottom.lerpLocal(intersectBottomLeft, intersectBottomRight, u);
    pointFinal.lerpLocal(pointTop, pointBottom, v);
com.ardor3d.mathVector4lerpLocal

Javadoc

Performs a linear interpolation between this vector and the given end vector, using the given scalar as a percent. iow, if changeAmnt is closer to 0, the result will be closer to the current value of this vector and if it is closer to 1, the result will be closer to the end value. The result is stored back in this vector.

Popular methods of Vector4

  • <init>
    Constructs a new vector set to the (x, y, z, w) values of the given source vector.
  • set
    Sets the value of this vector to the (x, y, z, w) values of the provided source vector.
  • getW
  • getX
  • getY
  • getZ
  • addLocal
    Increments the values of this vector with the x, y, z and w values of the given vector.
  • getXf
  • getYf
  • getZf
  • multiplyLocal
    Internally modifies the values of this vector by multiplying them each by the given scale values.
  • setW
    Sets the fourth component of this vector to the given double value.
  • multiplyLocal,
  • setW,
  • setX,
  • setY,
  • setZ,
  • dot,
  • fetchTempInstance,
  • getWf,
  • multiply,
  • normalizeLocal

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JComboBox (javax.swing)
  • JFrame (javax.swing)
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