org.wdssii.core
Class CVector

java.lang.Object
  extended by org.wdssii.core.CVector

public class CVector
extends Object

Subtracting two CPoints gives rise to a CVector Based on Thomas Vaughan's CVector class in the C++ version.

Version:
$Id: CVector.java,v 1.1 2006/12/27 20:48:09 lakshman Exp $
Author:
Lakshman

Field Summary
 double x
           
 double y
           
 double z
           
 
Constructor Summary
CVector(double x, double y, double z)
          everything in kilometers.
 
Method Summary
 CVector crossProduct(CVector v)
           
 double dotProduct(CVector v)
           
 CVector minus(CVector v)
           
 CVector multiply(double f)
           
 double norm()
           
 double normSquared()
           
 CVector plus(CVector v)
           
 String toString()
           
 CVector unit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x

y

public double y

z

public double z
Constructor Detail

CVector

public CVector(double x,
               double y,
               double z)
everything in kilometers. the z direction is the polar axis. x is from center through the Greenwich meridian y is from the center of earth through the Caribbean.

Method Detail

unit

public CVector unit()

norm

public double norm()

normSquared

public double normSquared()

multiply

public CVector multiply(double f)

plus

public CVector plus(CVector v)

minus

public CVector minus(CVector v)

dotProduct

public double dotProduct(CVector v)

crossProduct

public CVector crossProduct(CVector v)

toString

public String toString()
Overrides:
toString in class Object