All Packages Class Hierarchy This Package Previous Next Index
Class javax.vecmath.Vector3d
java.lang.Object
|
+----javax.vecmath.Tuple3d
|
+----javax.vecmath.Vector3d
- public class Vector3d
- extends javax.vecmath.Tuple3d
- implements java.io.Serializable
A 3 element vector that is represented by double precision floating point
x,y,z coordinates. If this value represents a normal, then it should be
normalized.
- Version:
- specification 1.1, implementation $Revision: 1.7 $, $Date: 1999/03/04 09:16:33 $
- Author:
- Kenji hiranabe
-
Vector3d()
- Constructs and initializes a Vector3d to (0,0,0).
-
Vector3d(double, double, double)
- Constructs and initializes a Vector3d from the specified xyz coordinates.
-
Vector3d(double[])
- Constructs and initializes a Vector3d from the specified array of length 3.
-
Vector3d(Tuple3d)
- Constructs and initializes a Vector3d from the specified Tuple3d.
-
Vector3d(Tuple3f)
- Constructs and initializes a Vector3d from the specified Tuple3f.
-
Vector3d(Vector3d)
- Constructs and initializes a Vector3d from the specified Vector3d.
-
Vector3d(Vector3f)
- Constructs and initializes a Vector3d from the specified Vector3f.
-
angle(Vector3d)
- Returns the angle in radians between this vector and
the vector parameter; the return value is constrained to the
range [0,PI].
-
cross(Vector3d, Vector3d)
- Sets this vector to be the vector cross product of vectors v1 and v2.
-
dot(Vector3d)
- Computes the dot product of the this vector and vector v1.
-
length()
- Returns the length of this vector.
-
lengthSquared()
- Returns the squared length of this vector.
-
normalize()
- Normalizes this vector in place.
-
normalize(Vector3d)
- Sets the value of this vector to the normalization of vector v1.
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
Vector3d
public Vector3d(double v[])
- Constructs and initializes a Vector3d from the specified array of length 3.
- Parameters:
- v - the array of length 3 containing xyz in order
Vector3d
public Vector3d(javax.vecmath.Vector3f v1)
- Constructs and initializes a Vector3d from the specified Vector3f.
- Parameters:
- v1 - the Vector3d containing the initialization x y z data
Vector3d
public Vector3d(javax.vecmath.Vector3d v1)
- Constructs and initializes a Vector3d from the specified Vector3d.
- Parameters:
- v1 - the Vector3d containing the initialization x y z data
Vector3d
public Vector3d(javax.vecmath.Tuple3d t1)
- Constructs and initializes a Vector3d from the specified Tuple3d.
- Parameters:
- t1 - the Tuple3d containing the initialization x y z data
Vector3d
public Vector3d(javax.vecmath.Tuple3f t1)
- Constructs and initializes a Vector3d from the specified Tuple3f.
- Parameters:
- t1 - the Tuple3f containing the initialization x y z data
Vector3d
public Vector3d()
- Constructs and initializes a Vector3d to (0,0,0).
cross
public final void cross(javax.vecmath.Vector3d v1,
javax.vecmath.Vector3d v2)
- Sets this vector to be the vector cross product of vectors v1 and v2.
- Parameters:
- v1 - the first vector
- v2 - the second vector
normalize
public final void normalize(javax.vecmath.Vector3d v1)
- Sets the value of this vector to the normalization of vector v1.
- Parameters:
- v1 - the un-normalized vector
normalize
public final void normalize()
- Normalizes this vector in place.
dot
public final double dot(javax.vecmath.Vector3d v1)
- Computes the dot product of the this vector and vector v1.
- Parameters:
- v1 - the other vector
lengthSquared
public final double lengthSquared()
- Returns the squared length of this vector.
- Returns:
- the squared length of this vector
length
public final double length()
- Returns the length of this vector.
- Returns:
- the length of this vector
angle
public final double angle(javax.vecmath.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