Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
IVector3 |
add(double scalar)
Adds a scalar to each component of this vector.
|
IVector3 |
add(IVector1 scalar)
Adds a scalar to each component of this vector.
|
IVector3 |
add(IVector3 vector)
Adds another vector to this vector, adding individual components.
|
IVector3 |
assign(IVector3 vector)
Assigns this vector the values of another vector.
|
Object |
clone()
Generates a deep clone of the vector.
|
IVector3 |
copy()
Makes a copy of the vector without using the complex clone interface.
|
IVector3 |
divide(IVector3 vector)
Performs a division on the vector.
|
boolean |
equals(IVector3 vector)
Compares the vector to another vector.
|
IVector2 |
getDirection()
Returns the direction of the vector.
|
IVector1 |
getDistance(IVector3 vector)
Returns the distance to another vector.
|
IVector1 |
getLength()
Returns the length (magnitude) of the vector.
|
IVector1 |
getX()
Returns the x-component of the vector.
|
BigDecimal |
getXAsBigDecimal()
Returns the x-component of the vector as BigDecimal.
|
double |
getXAsDouble()
Returns the x-component of the vector as double.
|
float |
getXAsFloat()
Returns the x-component of the vector as float.
|
int |
getXAsInteger()
Returns the x-component of the vector as integer.
|
long |
getXAsLong()
Returns the x-component of the vector as long.
|
IVector1 |
getY()
Returns the y-component of the vector.
|
BigDecimal |
getYAsBigDecimal()
Returns the y-component of the vector as BigDecimal.
|
double |
getYAsDouble()
Returns the y-component of the vector as double.
|
float |
getYAsFloat()
Returns the y-component of the vector as float.
|
int |
getYAsInteger()
Returns the y-component of the vector as integer.
|
long |
getYAsLong()
Returns the y-component of the vector as long.
|
IVector1 |
getZ()
Returns the z-component of the vector.
|
BigDecimal |
getZAsBigDecimal()
Returns the z-component of the vector as BigDecimal.
|
double |
getZAsDouble()
Returns the z-component of the vector as double.
|
float |
getZAsFloat()
Returns the z-component of the vector as float.
|
int |
getZAsInteger()
Returns the z-component of the vector as integer.
|
long |
getZAsLong()
Returns the z-component of the vector as long.
|
IVector3 |
mod(IVector3 modulus)
Applies a modulo vector.
|
IVector3 |
multiply(double scalar)
Performs a scalar multiplication (scaling) on the vector.
|
IVector3 |
multiply(IVector1 scalar)
Performs a scalar multiplication (scaling) on the vector.
|
IVector3 |
multiply(IVector3 vector)
Performs a multiplication on the vector.
|
IVector3 |
negate()
Negates the vector by negating its components.
|
IVector3 |
negateX()
Negates the x-component.
|
IVector3 |
negateY()
Negates the y-component.
|
IVector3 |
negateZ()
Negates the z-component.
|
IVector3 |
normalize()
Converts the vector to a unit vector (normalization)
|
IVector3 |
randomX(IVector1 lower,
IVector1 upper)
Sets the x-component to a random value in the interval [lower,upper]
|
IVector3 |
randomY(IVector1 lower,
IVector1 upper)
Sets the y-component to a random value in the interval [lower,upper]
|
IVector3 |
randomZ(IVector1 lower,
IVector1 upper)
Sets the z-component to a random value in the interval [lower,upper]
|
IVector3 |
subtract(double scalar)
Subtracts a scalar to each component of this vector.
|
IVector3 |
subtract(IVector1 scalar)
Subtracts a scalar to each component of this vector.
|
IVector3 |
subtract(IVector3 vector)
Subtracts a scalar to each component of this vector.
|
String |
toString() |
IVector3 |
zero()
Sets all vector components to zero.
|
public static final IVector3 ZERO
public Vector3Int()
public Vector3Int(IVector3 vector)
public Vector3Int(int scalar)
public Vector3Int(int x, int y, int z)
public IVector3 add(double scalar)
public IVector3 add(IVector3 vector)
public IVector3 subtract(IVector1 scalar)
public IVector3 subtract(IVector3 vector)
public IVector3 copy()
public boolean equals(IVector3 vector)
public IVector2 getDirection()
getDirection
in interface IVector3
public IVector1 getDistance(IVector3 vector)
getDistance
in interface IVector3
vector
- other vectorpublic IVector1 getLength()
public IVector1 getX()
public BigDecimal getXAsBigDecimal()
getXAsBigDecimal
in interface IVector3
public double getXAsDouble()
getXAsDouble
in interface IVector3
public float getXAsFloat()
getXAsFloat
in interface IVector3
public int getXAsInteger()
getXAsInteger
in interface IVector3
public long getXAsLong()
getXAsLong
in interface IVector3
public IVector1 getY()
public BigDecimal getYAsBigDecimal()
getYAsBigDecimal
in interface IVector3
public double getYAsDouble()
getYAsDouble
in interface IVector3
public float getYAsFloat()
getYAsFloat
in interface IVector3
public int getYAsInteger()
getYAsInteger
in interface IVector3
public long getYAsLong()
getYAsLong
in interface IVector3
public IVector1 getZ()
public BigDecimal getZAsBigDecimal()
getZAsBigDecimal
in interface IVector3
public double getZAsDouble()
getZAsDouble
in interface IVector3
public float getZAsFloat()
getZAsFloat
in interface IVector3
public int getZAsInteger()
getZAsInteger
in interface IVector3
public long getZAsLong()
getZAsLong
in interface IVector3
public IVector3 mod(IVector3 modulus)
public IVector3 multiply(double scalar)
public IVector3 multiply(IVector1 scalar)
public IVector3 negate()
public IVector3 negateX()
public IVector3 negateY()
public IVector3 negateZ()
public IVector3 normalize()
public IVector3 randomX(IVector1 lower, IVector1 upper)
public IVector3 randomY(IVector1 lower, IVector1 upper)
public IVector3 randomZ(IVector1 lower, IVector1 upper)
public IVector3 subtract(double scalar)
public IVector3 zero()
IVector3
public Object clone() throws CloneNotSupportedException
IVector3
clone
in interface IVector3
clone
in class Object
CloneNotSupportedException
Copyright © 2013. All Rights Reserved.