public class Vector3D extends Vector
Vector
, but in
addition, consists of a fourth property w
which can be used to represent the angle of rotation.
The matrix notation is shown below:
[ x ] [ y ] [ z ] [ w ]
Constructor and Description |
---|
Vector3D()
Constructs a Vector3D object
|
Vector3D(double x,
double y,
double z,
double w)
Constructs a Vector3D object with values (x,y,z,w)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests the specified object
obj for equality with this vector |
double |
getW()
Returns the w coordinate of this vector
|
int |
hashCode() |
void |
setW(double w)
Sets the w coordinate of this vector
|
String |
toString()
Returns the vector elements as a String
|
public Vector3D()
public Vector3D(double x, double y, double z, double w)
x
- the x coordinatey
- the y coordinatez
- the z coordinatew
- the w coordinatepublic double getW()
public void setW(double w)
w
- the w coordinatepublic boolean equals(Object obj)
obj
for equality with this vectorCopyright © 2009-2013. All Rights Reserved.