All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.vecmath.Vector3f

java.lang.Object
   |
   +----javax.vecmath.Tuple3f
           |
           +----javax.vecmath.Vector3f

public class Vector3f
extends javax.vecmath.Tuple3f
implements java.io.Serializable
A 3 element vector that is represented by single 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.8 $, $Date: 1999/03/04 09:16:33 $
Author:
Kenji hiranabe

Constructor Index

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

Method Index

 o angle(Vector3f)
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].
 o cross(Vector3f, Vector3f)
Sets this vector to be the vector cross product of vectors v1 and v2.
 o dot(Vector3f)
Computes the dot product of the 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(Vector3f)
Sets the value of this vector to the normalization of vector v1.

Constructors

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

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

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

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

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

Parameters:
t1 - the Tuple3d containing the initialization x y z data
 o Vector3f
 public Vector3f(javax.vecmath.Tuple3f t1)
Constructs and initializes a Vector3f from the specified Tuple3f.

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

Methods

 o lengthSquared
 public final float lengthSquared()
Returns the squared length of this vector.

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

Returns:
the length of this vector
 o cross
 public final void cross(javax.vecmath.Vector3f v1,
                         javax.vecmath.Vector3f v2)
Sets this vector to be the vector cross product of vectors v1 and v2.

Parameters:
v1 - the first vector
v2 - the second vector
 o dot
 public final float dot(javax.vecmath.Vector3f v1)
Computes the dot product of the this vector and vector v1.

Parameters:
v1 - the other vector
 o normalize
 public final void normalize(javax.vecmath.Vector3f 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 angle
 public final float angle(javax.vecmath.Vector3f 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