public class Vector extends Object
Modifier and Type | Field and Description |
---|---|
static Vector |
EX
Unary vector in 3 dimensional space
|
static Vector |
EY
Unary vector in 3 dimensional space
|
static Vector |
EZ
Unary vector in 3 dimensional space
|
static Vector |
NULLVECTOR
Null vector in 3 dimensional space
|
int |
size
The size of this vector
|
double[] |
vector
The content of this vector
|
Constructor and Description |
---|
Vector(double[] array)
Constructs a vector with the content of a array
|
Vector(int size)
Constructs a Vector with "size" elements
|
Vector(javax.vecmath.Tuple3d t)
Constructs a Vector with a Tuple3d, Vector3d or Point3d
|
Modifier and Type | Method and Description |
---|---|
Vector |
add(Vector b)
Addition from two vectors
|
Vector |
cross(Vector b)
Cross product, only well definited in R^3
|
double |
dot(Vector b)
Multiplikation from two vectors
|
Vector |
duplicate()
Copy a vector
|
int |
getSize()
Returns the size of this vector
|
double |
length()
Return the length from this vector
|
Vector |
mul(double b)
Multiplikation from a vectors with an double
|
Vector |
negate()
Negates this vector
|
Vector |
normalize()
Normalize this vector
|
Vector |
sub(Vector b)
Subtraktion from two vectors
|
String |
toString()
Return a vector as a string
|
public static final Vector NULLVECTOR
public static final Vector EX
public static final Vector EY
public static final Vector EZ
public double[] vector
public int size
public Vector(int size)
public Vector(double[] array)
public Vector(javax.vecmath.Tuple3d t)
public int getSize()
public Vector mul(double b)
public double dot(Vector b)
public double length()
public Vector normalize()
public Vector negate()
public Vector duplicate()
Copyright © 2017. All Rights Reserved.