Package jadex.extension.envsupport.math
Interface IVector3
- 
- All Known Implementing Classes:
- Vector3Double,- Vector3Int
 
 public interface IVector3Interface for cartesian 2-vectors NOTE: All operations on the vector are destructive and the instance returned is the same as the one whose method was called. If you require a copy of the vector before performing operations on it, use the copy constructor, the copy method or the clone interface.
- 
- 
Method SummaryAll Methods Instance Methods Abstract 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.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.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 another vector to this vector, subtracting individual components.IVector3zero()Sets all vector components to zero.
 
- 
- 
- 
Method Detail- 
assignIVector3 assign(IVector3 vector) Assigns this vector the values of another vector.- Parameters:
- vector- the other vector
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
addIVector3 add(double scalar) Adds a scalar to each component of this vector.- Parameters:
- scalar- scalar value as double
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
addIVector3 add(IVector1 scalar) Adds a scalar to each component of this vector.- Parameters:
- scalar- scalar value
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
addIVector3 add(IVector3 vector) Adds another vector to this vector, adding individual components.- Parameters:
- vector- the vector to add to this vector
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
subtractIVector3 subtract(double scalar) Subtracts a scalar to each component of this vector.- Parameters:
- scalar- scalar value as double
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
subtractIVector3 subtract(IVector1 scalar) Subtracts a scalar to each component of this vector.- Parameters:
- scalar- scalar value
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
subtractIVector3 subtract(IVector3 vector) Subtracts another vector to this vector, subtracting individual components.- Parameters:
- vector- the vector to subtract from this vector
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
modIVector3 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.- Parameters:
- modulus- modulus
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
multiplyIVector3 multiply(double scalar) Performs a scalar multiplication (scaling) on the vector.- Parameters:
- scalar- the scale factor double
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
multiplyIVector3 multiply(IVector1 scalar) Performs a scalar multiplication (scaling) on the vector.- Parameters:
- scalar- the scale factor
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
multiplyIVector3 multiply(IVector3 vector) Performs a multiplication on the vector.- Parameters:
- vector- vector
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
divideIVector3 divide(IVector3 vector) Performs a division on the vector.- Parameters:
- vector- vector
- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
zeroIVector3 zero() Sets all vector components to zero.- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
negateXIVector3 negateX() Negates the x-component.- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
negateYIVector3 negateY() Negates the y-component.- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
negateZIVector3 negateZ() Negates the z-component.- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
negateIVector3 negate() Negates the vector by negating its components.- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
randomXIVector3 randomX(IVector1 lower, IVector1 upper) Sets the x-component to a random value in the interval [lower,upper]- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
randomYIVector3 randomY(IVector1 lower, IVector1 upper) Sets the y-component to a random value in the interval [lower,upper]- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
randomZIVector3 randomZ(IVector1 lower, IVector1 upper) Sets the z-component to a random value in the interval [lower,upper]- Returns:
- a reference to the called vector (NOT a copy)
 
 - 
normalizeIVector3 normalize() Converts the vector to a unit vector (normalization)
 - 
getLengthIVector1 getLength() Returns the length (magnitude) of the vector.- Returns:
- vector length
 
 - 
getDirectionIVector2 getDirection() Returns the direction (theta) of the vector.- Returns:
- vector direction
 
 - 
getDistanceIVector1 getDistance(IVector3 vector) Returns the distance to another vector.- Parameters:
- vector- other vector
- Returns:
- distance
 
 - 
getXIVector1 getX() Returns the x-component of the vector.- Returns:
- x-component
 
 - 
getYIVector1 getY() Returns the y-component of the vector.- Returns:
- y-component
 
 - 
getZIVector1 getZ() Returns the z-component of the vector.- Returns:
- z-component
 
 - 
getXAsIntegerint getXAsInteger() Returns the x-component of the vector as integer.- Returns:
- x-component as integer
 
 - 
getYAsIntegerint getYAsInteger() Returns the component of the vector as integer.- Returns:
- y-component as float
 
 - 
getZAsIntegerint getZAsInteger() Returns the component of the vector as integer.- Returns:
- y-component as float
 
 - 
getXAsLonglong getXAsLong() Returns the x-component of the vector as long.- Returns:
- x-component as long
 
 - 
getYAsLonglong getYAsLong() Returns the component of the vector as float.- Returns:
- y-component as float
 
 - 
getZAsLonglong getZAsLong() Returns the component of the vector as float.- Returns:
- z-component as float
 
 - 
getXAsFloatfloat getXAsFloat() Returns the x-component of the vector as float.- Returns:
- x-component as float
 
 - 
getYAsFloatfloat getYAsFloat() Returns the component of the vector as float.- Returns:
- y-component as float
 
 - 
getZAsFloatfloat getZAsFloat() Returns the component of the vector as float.- Returns:
- z-component as float
 
 - 
getXAsDoubledouble getXAsDouble() Returns the x-component of the vector as double.- Returns:
- x-component as double
 
 - 
getYAsDoubledouble getYAsDouble() Returns the component of the vector as double.- Returns:
- y-component as double
 
 - 
getZAsDoubledouble getZAsDouble() Returns the component of the vector as double.- Returns:
- z-component as double
 
 - 
getXAsBigDecimaljava.math.BigDecimal getXAsBigDecimal() Returns the x-component of the vector as BigDecimal.- Returns:
- x-component as BigDecimal
 
 - 
getYAsBigDecimaljava.math.BigDecimal getYAsBigDecimal() Returns the component of the vector as BigDecima;.- Returns:
- y-component as BigDecimal
 
 - 
getZAsBigDecimaljava.math.BigDecimal getZAsBigDecimal() Returns the component of the vector as BigDecima;.- Returns:
- y-component as BigDecimal
 
 - 
copyIVector3 copy() Makes a copy of the vector without using the complex clone interface.- Returns:
- copy of the vector
 
 - 
clonejava.lang.Object clone() throws java.lang.CloneNotSupportedExceptionGenerates a deep clone of the vector.- Returns:
- clone of this vector
- Throws:
- java.lang.CloneNotSupportedException
 
 - 
equalsboolean equals(java.lang.Object obj) Compares the vector to an object- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- obj- the object
- Returns:
- always returns false unless the object is an IVector3, in which case it is equivalent to equals(IVector vector)
 
 - 
equalsboolean equals(IVector3 vector) Compares the vector to another vector. The vectors are equal if the components are equal.- Parameters:
- vector- the other vector
- Returns:
- true if the vectors are equal
 
 
- 
 
-