Package jadex.extension.envsupport.math
Class Vector3Int
- java.lang.Object
- 
- jadex.extension.envsupport.math.Vector3Int
 
- 
- 
Constructor SummaryConstructors Constructor Description Vector3Int()Creates a new Vector3Int with the value (0,0,0).Vector3Int(int scalar)Creates a new Vector3Int using the scalar to assign the value (scalar,scalar).Vector3Int(int x, int y, int z)Creates a new Vector3Int with the given value.Vector3Int(IVector3 vector)Creates a new Vector3 with the same value as the input vector.
 - 
Method SummaryAll 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.IVector2getDirection()Returns the direction of the vector.IVector1getDistance(IVector3 vector)Returns the distance to another vector.IVector1getLength()Returns the length (magnitude) of the vector.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 y-component of the vector as BigDecimal.doublegetYAsDouble()Returns the y-component of the vector as double.floatgetYAsFloat()Returns the y-component of the vector as float.intgetYAsInteger()Returns the y-component of the vector as integer.longgetYAsLong()Returns the y-component of the vector as long.IVector1getZ()Returns the z-component of the vector.java.math.BigDecimalgetZAsBigDecimal()Returns the z-component of the vector as BigDecimal.doublegetZAsDouble()Returns the z-component of the vector as double.floatgetZAsFloat()Returns the z-component of the vector as float.intgetZAsInteger()Returns the z-component of the vector as integer.longgetZAsLong()Returns the z-component of the vector as long.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]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 a scalar to each component of this vector.java.lang.StringtoString()IVector3zero()Sets all vector components to zero.
 
- 
- 
- 
Field Detail- 
ZEROpublic static final IVector3 ZERO Zero vector.
 
- 
 - 
Constructor Detail- 
Vector3Intpublic Vector3Int() Creates a new Vector3Int with the value (0,0,0).
 - 
Vector3Intpublic Vector3Int(IVector3 vector) Creates a new Vector3 with the same value as the input vector.
 - 
Vector3Intpublic Vector3Int(int scalar) Creates a new Vector3Int using the scalar to assign the value (scalar,scalar).
 - 
Vector3Intpublic Vector3Int(int x, int y, int z)Creates a new Vector3Int with the given value.
 
- 
 - 
Method Detail- 
addpublic IVector3 add(double scalar) Adds a scalar to each component of this vector.
 - 
addpublic IVector3 add(IVector3 vector) Adds another vector to this vector, adding individual components.
 - 
subtractpublic IVector3 subtract(IVector1 scalar) Subtracts a scalar to each component of this vector.
 - 
subtractpublic IVector3 subtract(IVector3 vector) Subtracts a scalar to each component of this vector.
 - 
copypublic IVector3 copy() Makes a copy of the vector without using the complex clone interface.
 - 
equalspublic boolean equals(IVector3 vector) Compares the vector to another vector. The vectors are equal if the components are equal.
 - 
getDirectionpublic IVector2 getDirection() Returns the direction of the vector.- Specified by:
- getDirectionin interface- IVector3
- Returns:
- vector direction
 
 - 
getDistancepublic IVector1 getDistance(IVector3 vector) Returns the distance to another vector.- Specified by:
- getDistancein interface- IVector3
- Parameters:
- vector- other vector
- Returns:
- distance
 
 - 
getLengthpublic IVector1 getLength() Returns the length (magnitude) of the vector.
 - 
getXpublic IVector1 getX() Returns the x-component of the vector.
 - 
getXAsBigDecimalpublic java.math.BigDecimal getXAsBigDecimal() Returns the x-component of the vector as BigDecimal.- Specified by:
- getXAsBigDecimalin interface- IVector3
- Returns:
- x-component as BigDecimal
 
 - 
getXAsDoublepublic double getXAsDouble() Returns the x-component of the vector as double.- Specified by:
- getXAsDoublein interface- IVector3
- Returns:
- x-component as double
 
 - 
getXAsFloatpublic float getXAsFloat() Returns the x-component of the vector as float.- Specified by:
- getXAsFloatin interface- IVector3
- Returns:
- x-component as float
 
 - 
getXAsIntegerpublic int getXAsInteger() Returns the x-component of the vector as integer.- Specified by:
- getXAsIntegerin interface- IVector3
- Returns:
- x-component as integer
 
 - 
getXAsLongpublic long getXAsLong() Returns the x-component of the vector as long.- Specified by:
- getXAsLongin interface- IVector3
- Returns:
- x-component as long
 
 - 
getYpublic IVector1 getY() Returns the y-component of the vector.
 - 
getYAsBigDecimalpublic java.math.BigDecimal getYAsBigDecimal() Returns the y-component of the vector as BigDecimal.- Specified by:
- getYAsBigDecimalin interface- IVector3
- Returns:
- y-component as BigDecimal
 
 - 
getYAsDoublepublic double getYAsDouble() Returns the y-component of the vector as double.- Specified by:
- getYAsDoublein interface- IVector3
- Returns:
- y-component as double
 
 - 
getYAsFloatpublic float getYAsFloat() Returns the y-component of the vector as float.- Specified by:
- getYAsFloatin interface- IVector3
- Returns:
- y-component as float
 
 - 
getYAsIntegerpublic int getYAsInteger() Returns the y-component of the vector as integer.- Specified by:
- getYAsIntegerin interface- IVector3
- Returns:
- y-component as integer
 
 - 
getYAsLongpublic long getYAsLong() Returns the y-component of the vector as long.- Specified by:
- getYAsLongin interface- IVector3
- Returns:
- y-component as long
 
 - 
getZpublic IVector1 getZ() Returns the z-component of the vector.
 - 
getZAsBigDecimalpublic java.math.BigDecimal getZAsBigDecimal() Returns the z-component of the vector as BigDecimal.- Specified by:
- getZAsBigDecimalin interface- IVector3
- Returns:
- z-component as BigDecimal
 
 - 
getZAsDoublepublic double getZAsDouble() Returns the z-component of the vector as double.- Specified by:
- getZAsDoublein interface- IVector3
- Returns:
- z-component as double
 
 - 
getZAsFloatpublic float getZAsFloat() Returns the z-component of the vector as float.- Specified by:
- getZAsFloatin interface- IVector3
- Returns:
- z-component as float
 
 - 
getZAsIntegerpublic int getZAsInteger() Returns the z-component of the vector as integer.- Specified by:
- getZAsIntegerin interface- IVector3
- Returns:
- z-component as integer
 
 - 
getZAsLongpublic long getZAsLong() Returns the z-component of the vector as long.- Specified by:
- getZAsLongin interface- IVector3
- Returns:
- z-component as long
 
 - 
modpublic IVector3 mod(IVector3 modulus) Applies 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) Performs a scalar multiplication (scaling) on the vector.
 - 
multiplypublic IVector3 multiply(IVector1 scalar) Performs a scalar multiplication (scaling) on the vector.
 - 
negatepublic IVector3 negate() Negates the vector by negating its components.
 - 
negateXpublic IVector3 negateX() Negates the x-component.
 - 
negateYpublic IVector3 negateY() Negates the y-component.
 - 
negateZpublic IVector3 negateZ() Negates the z-component.
 - 
normalizepublic IVector3 normalize() Converts the vector to a unit vector (normalization)
 - 
randomXpublic IVector3 randomX(IVector1 lower, IVector1 upper) Sets the x-component to a random value in the interval [lower,upper]
 - 
randomYpublic IVector3 randomY(IVector1 lower, IVector1 upper) Sets the y-component to a random value in the interval [lower,upper]
 - 
randomZpublic IVector3 randomZ(IVector1 lower, IVector1 upper) Sets the z-component to a random value in the interval [lower,upper]
 - 
subtractpublic IVector3 subtract(double scalar) Subtracts a scalar to each component of this vector.
 - 
zeropublic IVector3 zero() Description copied from interface:IVector3Sets all vector components to zero.
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:IVector3Generates a deep clone of the vector.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-