All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.vecmath.Vector4f

java.lang.Object
   |
   +----java.vecmath.Tuple4f
           |
           +----java.vecmath.Vector4f

public class Vector4f
extends Tuple4f
A 4 element vector represented by single precision floating point x,y,z,w coordinates.


Constructor Index

 o Vector4f()
Constructs and initializes a Vector4f to (0,0,0,0).
 o Vector4f(float, float, float, float)
Constructs and initializes a Vector4f from the specified xyzw coordinates.
 o Vector4f(float[])
Constructs and initializes a Vector4f from the array of length 4.
 o Vector4f(Vector4d)
Constructs and initializes a Vector4f from the specified Vector4d.
 o Vector4f(Vector4f)
Constructs and initializes a Vector4f from the specified Vector4f.

Method Index

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

Constructors

 o Vector4f
 public Vector4f(float x,
                 float y,
                 float z,
                 float w)
Constructs and initializes a Vector4f from the specified xyzw coordinates.

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

Parameters:
v - the array of length 4 containing xyzw in order
 o Vector4f
 public Vector4f(Vector4f v1)
Constructs and initializes a Vector4f from the specified Vector4f.

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

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

Methods

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

Returns:
the length of this vector as a float
 o lengthSquared
 public final float lengthSquared()
Returns the squared length of this vector

Returns:
the squared length of this vector as a float
 o dot
 public final float dot(Vector4f v1)
returns the dot product of this vector and v1

Parameters:
v1 - the other vector
Returns:
the dot product of this vector and v1
 o normalize
 public final void normalize(Vector4f 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(Vector4f v1)
Returns the (4-space) 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