Package jadex.extension.envsupport.math
Class Vector3Double
- java.lang.Object
- 
- jadex.extension.envsupport.math.Vector3Double
 
- 
- 
Constructor SummaryConstructors Constructor Description Vector3Double()Creates a new Vector2Double with the value (0,0).Vector3Double(double scalar)Creates a new Vector2 using the scalar to assign the value (scalar,scalar).Vector3Double(double x, double y, double z)Creates a new Vector2 with the given value.Vector3Double(IVector3 vector)Creates a new Vector3 with the same value as the input vector.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IVector3add(double scalar)Adds a scalar to each component of this vector.IVector3add(IVector1 scalar)Adds a scalar to each component of this vector.IVector3add(IVector3 vector)Adds another vector to this vector, adding individual components.IVector3assign(IVector3 vector)Assigns this vector the values of another vector.java.lang.Objectclone()Generates a deep clone of the vector.IVector3copy()Makes a copy of the vector without using the complex clone interface.IVector3divide(IVector3 vector)Performs a division on the vector.booleanequals(IVector3 vector)Compares the vector to another vector.booleanequals(java.lang.Object obj)Compares the vector to an objectIVector2getDirection()Returns the direction (theta) of the vector.IVector1getDistance(IVector3 vector)Returns the distance to another vector.IVector1getLength()Returns the length (magnitude) of the vector.static IVector3getVector3(java.lang.Double x, java.lang.Double y, java.lang.Double z)Get a vector for three doubles.IVector1getX()Returns the x-component of the vector.java.math.BigDecimalgetXAsBigDecimal()Returns the x-component of the vector as BigDecimal.doublegetXAsDouble()Returns the x-component of the vector as double.floatgetXAsFloat()Returns the x-component of the vector as float.intgetXAsInteger()Returns the x-component of the vector as integer.longgetXAsLong()Returns the x-component of the vector as long.IVector1getY()Returns the y-component of the vector.java.math.BigDecimalgetYAsBigDecimal()Returns the component of the vector as BigDecima;.doublegetYAsDouble()Returns the component of the vector as double.floatgetYAsFloat()Returns the component of the vector as float.intgetYAsInteger()Returns the component of the vector as integer.longgetYAsLong()Returns the component of the vector as float.IVector1getZ()Returns the z-component of the vector.java.math.BigDecimalgetZAsBigDecimal()Returns the component of the vector as BigDecima;.doublegetZAsDouble()Returns the component of the vector as double.floatgetZAsFloat()Returns the component of the vector as float.intgetZAsInteger()Returns the component of the vector as integer.longgetZAsLong()Returns the component of the vector as float.inthashCode()Compute the hash code.IVector3mod(IVector3 modulus)Applies a modulo vector.IVector3multiply(double scalar)Performs a scalar multiplication (scaling) on the vector.IVector3multiply(IVector1 scalar)Performs a scalar multiplication (scaling) on the vector.IVector3multiply(IVector3 vector)Performs a multiplication on the vector.IVector3negate()Negates the vector by negating its components.IVector3negateX()Negates the x-component.IVector3negateY()Negates the y-component.IVector3negateZ()Negates the z-component.IVector3normalize()Converts the vector to a unit vector (normalization)IVector3randomX(IVector1 lower, IVector1 upper)Sets the x-component to a random value in the interval [lower,upper]IVector3randomY(IVector1 lower, IVector1 upper)Sets the y-component to a random value in the interval [lower,upper]IVector3randomZ(IVector1 lower, IVector1 upper)Sets the z-component to a random value in the interval [lower,upper]voidsetX(IVector1 x)voidsetY(IVector1 y)voidsetZ(IVector1 z)IVector3subtract(double scalar)Subtracts a scalar to each component of this vector.IVector3subtract(IVector1 scalar)Subtracts a scalar to each component of this vector.IVector3subtract(IVector3 vector)Subtracts another vector to this vector, subtracting individual components.java.lang.StringtoString()IVector3zero()Sets all vector components to zero.
 
- 
- 
- 
Field Detail- 
ZEROpublic static final IVector3 ZERO Zero vector.
 
- 
 - 
Constructor Detail- 
Vector3Doublepublic Vector3Double() Creates a new Vector2Double with the value (0,0).
 - 
Vector3Doublepublic Vector3Double(IVector3 vector) Creates a new Vector3 with the same value as the input vector.
 - 
Vector3Doublepublic Vector3Double(double scalar) Creates a new Vector2 using the scalar to assign the value (scalar,scalar).
 - 
Vector3Doublepublic Vector3Double(double x, double y, double z)Creates a new Vector2 with the given value.
 
- 
 - 
Method Detail- 
addpublic IVector3 add(double scalar) Description copied from interface:IVector3Adds a scalar to each component of this vector.
 - 
addpublic IVector3 add(IVector1 scalar) Description copied from interface:IVector3Adds a scalar to each component of this vector.
 - 
addpublic IVector3 add(IVector3 vector) Description copied from interface:IVector3Adds another vector to this vector, adding individual components.
 - 
subtractpublic IVector3 subtract(double scalar) Description copied from interface:IVector3Subtracts a scalar to each component of this vector.
 - 
subtractpublic IVector3 subtract(IVector1 scalar) Description copied from interface:IVector3Subtracts a scalar to each component of this vector.
 - 
subtractpublic IVector3 subtract(IVector3 vector) Description copied from interface:IVector3Subtracts another vector to this vector, subtracting individual components.
 - 
modpublic IVector3 mod(IVector3 modulus) Description copied from interface:IVector3Applies a modulo vector. The modulus will be added first so that values in the interval (-modulus, 0) will wrap over into the positive range.
 - 
multiplypublic IVector3 multiply(double scalar) Description copied from interface:IVector3Performs a scalar multiplication (scaling) on the vector.
 - 
multiplypublic IVector3 multiply(IVector1 scalar) Description copied from interface:IVector3Performs a scalar multiplication (scaling) on the vector.
 - 
multiplypublic IVector3 multiply(IVector3 vector) Description copied from interface:IVector3Performs a multiplication on the vector.
 - 
zeropublic IVector3 zero() Description copied from interface:IVector3Sets all vector components to zero.
 - 
negateXpublic IVector3 negateX() Description copied from interface:IVector3Negates the x-component.
 - 
negateYpublic IVector3 negateY() Description copied from interface:IVector3Negates the y-component.
 - 
negateZpublic IVector3 negateZ() Description copied from interface:IVector3Negates the z-component.
 - 
negatepublic IVector3 negate() Description copied from interface:IVector3Negates the vector by negating its components.
 - 
randomXpublic IVector3 randomX(IVector1 lower, IVector1 upper) Description copied from interface:IVector3Sets the x-component to a random value in the interval [lower,upper]
 - 
randomYpublic IVector3 randomY(IVector1 lower, IVector1 upper) Description copied from interface:IVector3Sets the y-component to a random value in the interval [lower,upper]
 - 
randomZpublic IVector3 randomZ(IVector1 lower, IVector1 upper) Description copied from interface:IVector3Sets the z-component to a random value in the interval [lower,upper]
 - 
normalizepublic IVector3 normalize() Description copied from interface:IVector3Converts the vector to a unit vector (normalization)
 - 
getLengthpublic IVector1 getLength() Description copied from interface:IVector3Returns the length (magnitude) of the vector.
 - 
getDirectionpublic IVector2 getDirection() Description copied from interface:IVector3Returns the direction (theta) of the vector.- Specified by:
- getDirectionin interface- IVector3
- Returns:
- vector direction
 
 - 
getDistancepublic IVector1 getDistance(IVector3 vector) Description copied from interface:IVector3Returns the distance to another vector.- Specified by:
- getDistancein interface- IVector3
- Parameters:
- vector- other vector
- Returns:
- distance
 
 - 
getXpublic IVector1 getX() Description copied from interface:IVector3Returns the x-component of the vector.
 - 
getYpublic IVector1 getY() Description copied from interface:IVector3Returns the y-component of the vector.
 - 
getZpublic IVector1 getZ() Description copied from interface:IVector3Returns the z-component of the vector.
 - 
setXpublic void setX(IVector1 x) 
 - 
setYpublic void setY(IVector1 y) 
 - 
setZpublic void setZ(IVector1 z) 
 - 
getXAsIntegerpublic int getXAsInteger() Returns the x-component of the vector as integer.- Specified by:
- getXAsIntegerin interface- IVector3
- Returns:
- x-component as integer
 
 - 
getYAsIntegerpublic int getYAsInteger() Returns the component of the vector as integer.- Specified by:
- getYAsIntegerin interface- IVector3
- Returns:
- y-component as float
 
 - 
getZAsIntegerpublic int getZAsInteger() Returns the component of the vector as integer.- Specified by:
- getZAsIntegerin interface- IVector3
- Returns:
- y-component as float
 
 - 
getXAsLongpublic long getXAsLong() Returns the x-component of the vector as long.- Specified by:
- getXAsLongin interface- IVector3
- Returns:
- x-component as long
 
 - 
getYAsLongpublic long getYAsLong() Returns the component of the vector as float.- Specified by:
- getYAsLongin interface- IVector3
- Returns:
- y-component as float
 
 - 
getZAsLongpublic long getZAsLong() Returns the component of the vector as float.- Specified by:
- getZAsLongin interface- IVector3
- Returns:
- y-component as float
 
 - 
getXAsFloatpublic float getXAsFloat() Description copied from interface:IVector3Returns the x-component of the vector as float.- Specified by:
- getXAsFloatin interface- IVector3
- Returns:
- x-component as float
 
 - 
getYAsFloatpublic float getYAsFloat() Description copied from interface:IVector3Returns the component of the vector as float.- Specified by:
- getYAsFloatin interface- IVector3
- Returns:
- y-component as float
 
 - 
getZAsFloatpublic float getZAsFloat() Description copied from interface:IVector3Returns the component of the vector as float.- Specified by:
- getZAsFloatin interface- IVector3
- Returns:
- z-component as float
 
 - 
getXAsDoublepublic double getXAsDouble() Description copied from interface:IVector3Returns the x-component of the vector as double.- Specified by:
- getXAsDoublein interface- IVector3
- Returns:
- x-component as double
 
 - 
getYAsDoublepublic double getYAsDouble() Description copied from interface:IVector3Returns the component of the vector as double.- Specified by:
- getYAsDoublein interface- IVector3
- Returns:
- y-component as double
 
 - 
getZAsDoublepublic double getZAsDouble() Description copied from interface:IVector3Returns the component of the vector as double.- Specified by:
- getZAsDoublein interface- IVector3
- Returns:
- z-component as double
 
 - 
getXAsBigDecimalpublic java.math.BigDecimal getXAsBigDecimal() Description copied from interface:IVector3Returns the x-component of the vector as BigDecimal.- Specified by:
- getXAsBigDecimalin interface- IVector3
- Returns:
- x-component as BigDecimal
 
 - 
getYAsBigDecimalpublic java.math.BigDecimal getYAsBigDecimal() Description copied from interface:IVector3Returns the component of the vector as BigDecima;.- Specified by:
- getYAsBigDecimalin interface- IVector3
- Returns:
- y-component as BigDecimal
 
 - 
getZAsBigDecimalpublic java.math.BigDecimal getZAsBigDecimal() Description copied from interface:IVector3Returns the component of the vector as BigDecima;.- Specified by:
- getZAsBigDecimalin interface- IVector3
- Returns:
- y-component as BigDecimal
 
 - 
copypublic IVector3 copy() Description copied from interface:IVector3Makes a copy of the vector without using the complex clone interface.
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:IVector3Generates a deep clone of the vector.
 - 
equalspublic boolean equals(java.lang.Object obj) Description copied from interface:IVector3Compares the vector to an object
 - 
equalspublic boolean equals(IVector3 vector) Description copied from interface:IVector3Compares the vector to another vector. The vectors are equal if the components are equal.
 - 
hashCodepublic int hashCode() Compute the hash code.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hash code.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
getVector3public static IVector3 getVector3(java.lang.Double x, java.lang.Double y, java.lang.Double z) Get a vector for three doubles.- Parameters:
- x- The first value.
- y- The second value.
- z- The second value
- Returns:
- The vector (null if at least one of args is null).
 
 
- 
 
-