math
Class Vector

java.lang.Object
  extended by math.Vector
Direct Known Subclasses:
Point3D, Vector3D

public class Vector
extends java.lang.Object

a 4 vector for homogene coordinates


Field Summary
 double w
           
 double x
           
 double y
           
 double z
           
 
Constructor Summary
Vector(double x, double y, double z, double w)
          constructor
 
Method Summary
 double dot(Vector v)
          calculates the scalar product
 boolean normalize()
          normalize depending on context (vector or point)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public double x

y

public double y

z

public double z

w

public double w
Constructor Detail

Vector

public Vector(double x,
              double y,
              double z,
              double w)
constructor

Parameters:
x -
y -
z -
w - 4th component
Method Detail

normalize

public boolean normalize()
normalize depending on context (vector or point)

Returns:
if normalizing was successfull

dot

public double dot(Vector v)
calculates the scalar product

Parameters:
v - [in] vector
Returns:
this dot v