All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.vecmath.Vector3d

java.lang.Object
   |
   +----java.vecmath.Tuple3d
           |
           +----java.vecmath.Vector3d

public class Vector3d
extends Tuple3d
A 3 element vector that is represented by double precision floating point x,y,z coordinates.


Constructor Index

 o Vector3d()
Constructs and initializes a Vector3d to (0,0,0).
 o Vector3d(double, double, double)
Constructs and initializes a Vector3d from the specified xyz coordinates.
 o Vector3d(double[])
Constructs and initializes a Vector3d from the array of length 3.
 o Vector3d(Vector3d)
Constructs and initializes a Vector3d from the specified Vector3d.
 o Vector3d(Vector3f)
Constructs and initializes a Vector3d from the specified Vector3f.

Method Index

 o angle(Vector3d)
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].
 o cross(Vector3d, Vector3d)
Sets this vector to the vector cross product of vectors v1 and v2.
 o dot(Vector3d)
Returns the dot product of this vector and vector v1.
 o length()
Returns the length of this vector.
 o lengthSquared()
Returns the squared length of this vector.
 o normalize()
Normalizes this vector in place.
 o normalize(Vector3d)
Sets the value of this vector to the normalization of vector v1.

Constructors

 o Vector3d
 public Vector3d(double x,
                 double y,
                 double z)
Constructs and initializes a Vector3d from the specified xyz coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
z - the z coordinate
 o Vector3d
 public Vector3d(double v[])
Constructs and initializes a Vector3d from the array of length 3.

Parameters:
v - the array of length 3 containing xyz in order
 o Vector3d
 public Vector3d(Vector3d v1)
Constructs and initializes a Vector3d from the specified Vector3d.

Parameters:
v1 - the Vector3d containing the initialization x y z data
 o Vector3d
 public Vector3d(Vector3f v1)
Constructs and initializes a Vector3d from the specified Vector3f.

Parameters:
v1 - the Vector3f containing the initialization x y z data
 o Vector3d
 public Vector3d()
Constructs and initializes a Vector3d to (0,0,0).

Methods

 o cross
 public final void cross(Vector3d v1,
                         Vector3d v2)
Sets this vector to the vector cross product of vectors v1 and v2.

Parameters:
v1 - the first vector
v2 - the second vector
 o normalize
 public final void normalize(Vector3d v1)
Sets the value of this vector to the normalization of vector v1.

Parameters:
v1 - the un-normalized vector
 o normalize
 public final void normalize()
Normalizes this vector in place.

 o dot
 public final double dot(Vector3d v1)
Returns the dot product of this vector and vector v1.

Parameters:
v1 - the other vector
Returns:
the dot product of this and v1
 o lengthSquared
 public final double lengthSquared()
Returns the squared length of this vector.

Returns:
the squared length of this vector
 o length
 public final double length()
Returns the length of this vector.

Returns:
the length of this vector
 o angle
 public final double angle(Vector3d v1)
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].

Parameters:
v1 - The other vector
Returns:
The angle in radians in the range [0,PI]

All Packages  Class Hierarchy  This Package  Previous  Next  Index