Class LJ_GDX_math.Vector_AZ.LIP

java.lang.Object
com.prineside.luaj.mapping.InterfaceProxy
com.prineside.luaj.mapping.parts.LJ_GDX_math.Vector_AZ.LIP
All Implemented Interfaces:
com.badlogic.gdx.math.Vector, com.esotericsoftware.kryo.KryoSerializable
Enclosing class:
LJ_GDX_math.Vector_AZ

public static class LJ_GDX_math.Vector_AZ.LIP extends InterfaceProxy implements com.badlogic.gdx.math.Vector
  • Field Summary

    Fields inherited from class com.prineside.luaj.mapping.InterfaceProxy

    luaObj
  • Method Summary

    Modifier and Type
    Method
    Description
    com.badlogic.gdx.math.Vector
    add(com.badlogic.gdx.math.Vector p1)
    Adds the given vector to this vector
    com.badlogic.gdx.math.Vector
    clamp(float p1, float p2)
    Clamps this vector's length to given min and max values
    com.badlogic.gdx.math.Vector
    cpy()
     
    float
    dot(com.badlogic.gdx.math.Vector p1)
     
    float
    dst(com.badlogic.gdx.math.Vector p1)
     
    float
    dst2(com.badlogic.gdx.math.Vector p1)
    This method is faster than Vector.dst(Vector) because it avoids calculating a square root.
    boolean
    epsilonEquals(com.badlogic.gdx.math.Vector p1, float p2)
    Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.
    boolean
    hasOppositeDirection(com.badlogic.gdx.math.Vector p1)
     
    boolean
    hasSameDirection(com.badlogic.gdx.math.Vector p1)
     
    com.badlogic.gdx.math.Vector
    interpolate(com.badlogic.gdx.math.Vector p1, float p2, com.badlogic.gdx.math.Interpolation p3)
    Interpolates between this vector and the given target vector by alpha (within range [0,1]) using the given Interpolation method.
    boolean
    isCollinear(com.badlogic.gdx.math.Vector p1)
     
    boolean
    isCollinear(com.badlogic.gdx.math.Vector p1, float p2)
     
    boolean
    isCollinearOpposite(com.badlogic.gdx.math.Vector p1)
     
    boolean
    isCollinearOpposite(com.badlogic.gdx.math.Vector p1, float p2)
     
    boolean
    isOnLine(com.badlogic.gdx.math.Vector p1)
     
    boolean
    isOnLine(com.badlogic.gdx.math.Vector p1, float p2)
     
    boolean
    isPerpendicular(com.badlogic.gdx.math.Vector p1)
     
    boolean
    isPerpendicular(com.badlogic.gdx.math.Vector p1, float p2)
     
    boolean
     
    boolean
    isUnit(float p1)
     
    boolean
     
    boolean
    isZero(float p1)
     
    float
    len()
     
    float
    This method is faster than Vector.len() because it avoids calculating a square root.
    com.badlogic.gdx.math.Vector
    lerp(com.badlogic.gdx.math.Vector p1, float p2)
    Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1].
    com.badlogic.gdx.math.Vector
    limit(float p1)
    Limits the length of this vector, based on the desired maximum length.
    com.badlogic.gdx.math.Vector
    limit2(float p1)
    Limits the length of this vector, based on the desired maximum length squared.
    com.badlogic.gdx.math.Vector
    mulAdd(com.badlogic.gdx.math.Vector p1, float p2)
    First scale a supplied vector, then add it to this vector.
    com.badlogic.gdx.math.Vector
    mulAdd(com.badlogic.gdx.math.Vector p1, com.badlogic.gdx.math.Vector p2)
    First scale a supplied vector, then add it to this vector.
    com.badlogic.gdx.math.Vector
    nor()
    Normalizes this vector.
    com.badlogic.gdx.math.Vector
    scl(float p1)
    Scales this vector by a scalar
    com.badlogic.gdx.math.Vector
    scl(com.badlogic.gdx.math.Vector p1)
    Scales this vector by another vector
    com.badlogic.gdx.math.Vector
    set(com.badlogic.gdx.math.Vector p1)
    Sets this vector from the given vector
    com.badlogic.gdx.math.Vector
    setLength(float p1)
    Sets the length of this vector.
    com.badlogic.gdx.math.Vector
    setLength2(float p1)
    Sets the length of this vector, based on the square of the desired length.
    com.badlogic.gdx.math.Vector
    Sets this vector to the unit vector with a random direction
    com.badlogic.gdx.math.Vector
    Sets the components of this vector to 0
    com.badlogic.gdx.math.Vector
    sub(com.badlogic.gdx.math.Vector p1)
    Subtracts the given vector from this vector.

    Methods inherited from class com.prineside.luaj.mapping.InterfaceProxy

    getLuaObj, read, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • add

      public com.badlogic.gdx.math.Vector add(com.badlogic.gdx.math.Vector p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Adds the given vector to this vector
      Specified by:
      add in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The vector
      Returns:
      This vector for chaining
    • clamp

      public com.badlogic.gdx.math.Vector clamp(float p1, float p2)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Clamps this vector's length to given min and max values
      Specified by:
      clamp in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - Min length
      p2 - Max length
      Returns:
      This vector for chaining
    • cpy

      public com.badlogic.gdx.math.Vector cpy()
      Specified by:
      cpy in interface com.badlogic.gdx.math.Vector
      Returns:
      a copy of this vector
    • dot

      public float dot(com.badlogic.gdx.math.Vector p1)
      Specified by:
      dot in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The other vector
      Returns:
      The dot product between this and the other vector
    • dst

      public float dst(com.badlogic.gdx.math.Vector p1)
      Specified by:
      dst in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The other vector
      Returns:
      the distance between this and the other vector
    • dst2

      public float dst2(com.badlogic.gdx.math.Vector p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      This method is faster than Vector.dst(Vector) because it avoids calculating a square root. It is useful for comparisons, but not for getting accurate distances, as the return value is the square of the actual distance.
      Specified by:
      dst2 in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The other vector
      Returns:
      the squared distance between this and the other vector
    • epsilonEquals

      public boolean epsilonEquals(com.badlogic.gdx.math.Vector p1, float p2)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.
      Specified by:
      epsilonEquals in interface com.badlogic.gdx.math.Vector
      Returns:
      whether the vectors have fuzzy equality.
    • hasOppositeDirection

      public boolean hasOppositeDirection(com.badlogic.gdx.math.Vector p1)
      Specified by:
      hasOppositeDirection in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether this vector has opposite direction compared to the other vector. True if the normalized dot product is < 0.
    • hasSameDirection

      public boolean hasSameDirection(com.badlogic.gdx.math.Vector p1)
      Specified by:
      hasSameDirection in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether this vector has similar direction compared to the other vector. True if the normalized dot product is > 0.
    • interpolate

      public com.badlogic.gdx.math.Vector interpolate(com.badlogic.gdx.math.Vector p1, float p2, com.badlogic.gdx.math.Interpolation p3)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Interpolates between this vector and the given target vector by alpha (within range [0,1]) using the given Interpolation method. the result is stored in this vector.
      Specified by:
      interpolate in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The target vector
      p2 - The interpolation coefficient
      p3 - An Interpolation object describing the used interpolation method
      Returns:
      This vector for chaining.
    • isCollinear

      public boolean isCollinear(com.badlogic.gdx.math.Vector p1)
      Specified by:
      isCollinear in interface com.badlogic.gdx.math.Vector
      Returns:
      true if this vector is collinear with the other vector (Vector.isOnLine(Vector) && Vector.hasSameDirection(Vector)).
    • isCollinear

      public boolean isCollinear(com.badlogic.gdx.math.Vector p1, float p2)
      Specified by:
      isCollinear in interface com.badlogic.gdx.math.Vector
      Returns:
      true if this vector is collinear with the other vector (Vector.isOnLine(Vector, float) && Vector.hasSameDirection(Vector)).
    • isCollinearOpposite

      public boolean isCollinearOpposite(com.badlogic.gdx.math.Vector p1)
      Specified by:
      isCollinearOpposite in interface com.badlogic.gdx.math.Vector
      Returns:
      true if this vector is opposite collinear with the other vector (Vector.isOnLine(Vector) && Vector.hasOppositeDirection(Vector)).
    • isCollinearOpposite

      public boolean isCollinearOpposite(com.badlogic.gdx.math.Vector p1, float p2)
      Specified by:
      isCollinearOpposite in interface com.badlogic.gdx.math.Vector
      Returns:
      true if this vector is opposite collinear with the other vector (Vector.isOnLine(Vector, float) && Vector.hasOppositeDirection(Vector)).
    • isOnLine

      public boolean isOnLine(com.badlogic.gdx.math.Vector p1)
      Specified by:
      isOnLine in interface com.badlogic.gdx.math.Vector
      Returns:
      true if this vector is in line with the other vector (either in the same or the opposite direction)
    • isOnLine

      public boolean isOnLine(com.badlogic.gdx.math.Vector p1, float p2)
      Specified by:
      isOnLine in interface com.badlogic.gdx.math.Vector
      Returns:
      true if this vector is in line with the other vector (either in the same or the opposite direction)
    • isPerpendicular

      public boolean isPerpendicular(com.badlogic.gdx.math.Vector p1)
      Specified by:
      isPerpendicular in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether this vector is perpendicular with the other vector. True if the dot product is 0.
    • isPerpendicular

      public boolean isPerpendicular(com.badlogic.gdx.math.Vector p1, float p2)
      Specified by:
      isPerpendicular in interface com.badlogic.gdx.math.Vector
      p2 - a positive small number close to zero
      Returns:
      Whether this vector is perpendicular with the other vector. True if the dot product is 0.
    • isUnit

      public boolean isUnit()
      Specified by:
      isUnit in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether this vector is a unit length vector
    • isUnit

      public boolean isUnit(float p1)
      Specified by:
      isUnit in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether this vector is a unit length vector within the given margin.
    • isZero

      public boolean isZero()
      Specified by:
      isZero in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether this vector is a zero vector
    • isZero

      public boolean isZero(float p1)
      Specified by:
      isZero in interface com.badlogic.gdx.math.Vector
      Returns:
      Whether the length of this vector is smaller than the given margin
    • len

      public float len()
      Specified by:
      len in interface com.badlogic.gdx.math.Vector
      Returns:
      The euclidean length
    • len2

      public float len2()
      Description copied from interface: com.badlogic.gdx.math.Vector
      This method is faster than Vector.len() because it avoids calculating a square root. It is useful for comparisons, but not for getting exact lengths, as the return value is the square of the actual length.
      Specified by:
      len2 in interface com.badlogic.gdx.math.Vector
      Returns:
      The squared euclidean length
    • lerp

      public com.badlogic.gdx.math.Vector lerp(com.badlogic.gdx.math.Vector p1, float p2)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is stored in this vector.
      Specified by:
      lerp in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The target vector
      p2 - The interpolation coefficient
      Returns:
      This vector for chaining.
    • limit

      public com.badlogic.gdx.math.Vector limit(float p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Limits the length of this vector, based on the desired maximum length.
      Specified by:
      limit in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - desired maximum length for this vector
      Returns:
      this vector for chaining
    • limit2

      public com.badlogic.gdx.math.Vector limit2(float p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Limits the length of this vector, based on the desired maximum length squared.

      This method is slightly faster than limit().

      Specified by:
      limit2 in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - squared desired maximum length for this vector
      Returns:
      this vector for chaining
      See Also:
      • Vector.len2()
    • mulAdd

      public com.badlogic.gdx.math.Vector mulAdd(com.badlogic.gdx.math.Vector p1, float p2)
      Description copied from interface: com.badlogic.gdx.math.Vector
      First scale a supplied vector, then add it to this vector.
      Specified by:
      mulAdd in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - addition vector
      p2 - for scaling the addition vector
    • mulAdd

      public com.badlogic.gdx.math.Vector mulAdd(com.badlogic.gdx.math.Vector p1, com.badlogic.gdx.math.Vector p2)
      Description copied from interface: com.badlogic.gdx.math.Vector
      First scale a supplied vector, then add it to this vector.
      Specified by:
      mulAdd in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - addition vector
      p2 - vector by whose values the addition vector will be scaled
    • nor

      public com.badlogic.gdx.math.Vector nor()
      Description copied from interface: com.badlogic.gdx.math.Vector
      Normalizes this vector. Does nothing if it is zero.
      Specified by:
      nor in interface com.badlogic.gdx.math.Vector
      Returns:
      This vector for chaining
    • scl

      public com.badlogic.gdx.math.Vector scl(float p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Scales this vector by a scalar
      Specified by:
      scl in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The scalar
      Returns:
      This vector for chaining
    • scl

      public com.badlogic.gdx.math.Vector scl(com.badlogic.gdx.math.Vector p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Scales this vector by another vector
      Specified by:
      scl in interface com.badlogic.gdx.math.Vector
      Returns:
      This vector for chaining
    • set

      public com.badlogic.gdx.math.Vector set(com.badlogic.gdx.math.Vector p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Sets this vector from the given vector
      Specified by:
      set in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The vector
      Returns:
      This vector for chaining
    • setLength

      public com.badlogic.gdx.math.Vector setLength(float p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Sets the length of this vector. Does nothing if this vector is zero.
      Specified by:
      setLength in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - desired length for this vector
      Returns:
      this vector for chaining
    • setLength2

      public com.badlogic.gdx.math.Vector setLength2(float p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Sets the length of this vector, based on the square of the desired length. Does nothing if this vector is zero.

      This method is slightly faster than setLength().

      Specified by:
      setLength2 in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - desired square of the length for this vector
      Returns:
      this vector for chaining
      See Also:
      • Vector.len2()
    • setToRandomDirection

      public com.badlogic.gdx.math.Vector setToRandomDirection()
      Description copied from interface: com.badlogic.gdx.math.Vector
      Sets this vector to the unit vector with a random direction
      Specified by:
      setToRandomDirection in interface com.badlogic.gdx.math.Vector
      Returns:
      This vector for chaining
    • setZero

      public com.badlogic.gdx.math.Vector setZero()
      Description copied from interface: com.badlogic.gdx.math.Vector
      Sets the components of this vector to 0
      Specified by:
      setZero in interface com.badlogic.gdx.math.Vector
      Returns:
      This vector for chaining
    • sub

      public com.badlogic.gdx.math.Vector sub(com.badlogic.gdx.math.Vector p1)
      Description copied from interface: com.badlogic.gdx.math.Vector
      Subtracts the given vector from this vector.
      Specified by:
      sub in interface com.badlogic.gdx.math.Vector
      Parameters:
      p1 - The vector
      Returns:
      This vector for chaining