Package com.prineside.luaj.mapping.parts
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 TypeMethodDescriptioncom.badlogic.gdx.math.Vectoradd(com.badlogic.gdx.math.Vector p1) Adds the given vector to this vectorcom.badlogic.gdx.math.Vectorclamp(float p1, float p2) Clamps this vector's length to given min and max valuescom.badlogic.gdx.math.Vectorcpy()floatdot(com.badlogic.gdx.math.Vector p1) floatdst(com.badlogic.gdx.math.Vector p1) floatdst2(com.badlogic.gdx.math.Vector p1) This method is faster thanVector.dst(Vector)because it avoids calculating a square root.booleanepsilonEquals(com.badlogic.gdx.math.Vector p1, float p2) Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.booleanhasOppositeDirection(com.badlogic.gdx.math.Vector p1) booleanhasSameDirection(com.badlogic.gdx.math.Vector p1) com.badlogic.gdx.math.Vectorinterpolate(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.booleanisCollinear(com.badlogic.gdx.math.Vector p1) booleanisCollinear(com.badlogic.gdx.math.Vector p1, float p2) booleanisCollinearOpposite(com.badlogic.gdx.math.Vector p1) booleanisCollinearOpposite(com.badlogic.gdx.math.Vector p1, float p2) booleanisOnLine(com.badlogic.gdx.math.Vector p1) booleanisOnLine(com.badlogic.gdx.math.Vector p1, float p2) booleanisPerpendicular(com.badlogic.gdx.math.Vector p1) booleanisPerpendicular(com.badlogic.gdx.math.Vector p1, float p2) booleanisUnit()booleanisUnit(float p1) booleanisZero()booleanisZero(float p1) floatlen()floatlen2()This method is faster thanVector.len()because it avoids calculating a square root.com.badlogic.gdx.math.Vectorlerp(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.Vectorlimit(float p1) Limits the length of this vector, based on the desired maximum length.com.badlogic.gdx.math.Vectorlimit2(float p1) Limits the length of this vector, based on the desired maximum length squared.com.badlogic.gdx.math.VectormulAdd(com.badlogic.gdx.math.Vector p1, float p2) First scale a supplied vector, then add it to this vector.com.badlogic.gdx.math.VectormulAdd(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.Vectornor()Normalizes this vector.com.badlogic.gdx.math.Vectorscl(float p1) Scales this vector by a scalarcom.badlogic.gdx.math.Vectorscl(com.badlogic.gdx.math.Vector p1) Scales this vector by another vectorcom.badlogic.gdx.math.Vectorset(com.badlogic.gdx.math.Vector p1) Sets this vector from the given vectorcom.badlogic.gdx.math.VectorsetLength(float p1) Sets the length of this vector.com.badlogic.gdx.math.VectorsetLength2(float p1) Sets the length of this vector, based on the square of the desired length.com.badlogic.gdx.math.VectorSets this vector to the unit vector with a random directioncom.badlogic.gdx.math.VectorsetZero()Sets the components of this vector to 0com.badlogic.gdx.math.Vectorsub(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
-
Method Details
-
add
public com.badlogic.gdx.math.Vector add(com.badlogic.gdx.math.Vector p1) Description copied from interface:com.badlogic.gdx.math.VectorAdds the given vector to this vector- Specified by:
addin interfacecom.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.VectorClamps this vector's length to given min and max values- Specified by:
clampin interfacecom.badlogic.gdx.math.Vector- Parameters:
p1- Min lengthp2- Max length- Returns:
- This vector for chaining
-
cpy
public com.badlogic.gdx.math.Vector cpy()- Specified by:
cpyin interfacecom.badlogic.gdx.math.Vector- Returns:
- a copy of this vector
-
dot
public float dot(com.badlogic.gdx.math.Vector p1) - Specified by:
dotin interfacecom.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:
dstin interfacecom.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.VectorThis method is faster thanVector.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:
dst2in interfacecom.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.VectorCompares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.- Specified by:
epsilonEqualsin interfacecom.badlogic.gdx.math.Vector- Returns:
- whether the vectors have fuzzy equality.
-
hasOppositeDirection
public boolean hasOppositeDirection(com.badlogic.gdx.math.Vector p1) - Specified by:
hasOppositeDirectionin interfacecom.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:
hasSameDirectionin interfacecom.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.VectorInterpolates 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:
interpolatein interfacecom.badlogic.gdx.math.Vector- Parameters:
p1- The target vectorp2- The interpolation coefficientp3- 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:
isCollinearin interfacecom.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:
isCollinearin interfacecom.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:
isCollinearOppositein interfacecom.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:
isCollinearOppositein interfacecom.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:
isOnLinein interfacecom.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:
isOnLinein interfacecom.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:
isPerpendicularin interfacecom.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:
isPerpendicularin interfacecom.badlogic.gdx.math.Vectorp2- 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:
isUnitin interfacecom.badlogic.gdx.math.Vector- Returns:
- Whether this vector is a unit length vector
-
isUnit
public boolean isUnit(float p1) - Specified by:
isUnitin interfacecom.badlogic.gdx.math.Vector- Returns:
- Whether this vector is a unit length vector within the given margin.
-
isZero
public boolean isZero()- Specified by:
isZeroin interfacecom.badlogic.gdx.math.Vector- Returns:
- Whether this vector is a zero vector
-
isZero
public boolean isZero(float p1) - Specified by:
isZeroin interfacecom.badlogic.gdx.math.Vector- Returns:
- Whether the length of this vector is smaller than the given margin
-
len
public float len()- Specified by:
lenin interfacecom.badlogic.gdx.math.Vector- Returns:
- The euclidean length
-
len2
public float len2()Description copied from interface:com.badlogic.gdx.math.VectorThis method is faster thanVector.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:
len2in interfacecom.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.VectorLinearly 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:
lerpin interfacecom.badlogic.gdx.math.Vector- Parameters:
p1- The target vectorp2- 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.VectorLimits the length of this vector, based on the desired maximum length.- Specified by:
limitin interfacecom.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.VectorLimits the length of this vector, based on the desired maximum length squared. This method is slightly faster than limit().- Specified by:
limit2in interfacecom.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.VectorFirst scale a supplied vector, then add it to this vector.- Specified by:
mulAddin interfacecom.badlogic.gdx.math.Vector- Parameters:
p1- addition vectorp2- 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.VectorFirst scale a supplied vector, then add it to this vector.- Specified by:
mulAddin interfacecom.badlogic.gdx.math.Vector- Parameters:
p1- addition vectorp2- 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.VectorNormalizes this vector. Does nothing if it is zero.- Specified by:
norin interfacecom.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.VectorScales this vector by a scalar- Specified by:
sclin interfacecom.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.VectorScales this vector by another vector- Specified by:
sclin interfacecom.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.VectorSets this vector from the given vector- Specified by:
setin interfacecom.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.VectorSets the length of this vector. Does nothing if this vector is zero.- Specified by:
setLengthin interfacecom.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.VectorSets 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:
setLength2in interfacecom.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.VectorSets this vector to the unit vector with a random direction- Specified by:
setToRandomDirectionin interfacecom.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.VectorSets the components of this vector to 0- Specified by:
setZeroin interfacecom.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.VectorSubtracts the given vector from this vector.- Specified by:
subin interfacecom.badlogic.gdx.math.Vector- Parameters:
p1- The vector- Returns:
- This vector for chaining
-