org.jscience.geography.coordinates
Class Direction

java.lang.Object
  extended by org.jscience.geography.coordinates.Direction
All Implemented Interfaces:
java.lang.Cloneable

public class Direction
extends java.lang.Object
implements java.lang.Cloneable

The Direction abstract contains a three element vector and a reference location.

See Also:
BaseSRF_3D

Field Summary
protected  Coord3D _ref_coord
           
protected  double[] _vec
           
 
Constructor Summary
protected Direction(BaseSRF srf, Coord3D ref_coord, double[] vec)
          Constructor, requires an SRF, 3 reference coordinate values, and 3 direction values.
 
Method Summary
 void copyTo(Direction dir)
          Copies the vector component values of this direction to the input direction.
protected  Coord3D getInternalRefCoord()
           
 Coord3D getRefCoord()
           
 BaseSRF getSRF()
           
 double[] getVec()
           
 double getVectorComp(int n)
          Return the values of the Nth direction vector component.
 double getVectorComp1()
           
 double getVectorComp2()
           
 double getVectorComp3()
           
 boolean isEqual(Direction dir)
          Returns TRUE if the Direction parameters are "Equal"
 Direction makeClone()
          Returns the shallow copy of this object instance.
 void setVec(double[] vec)
           
 void setVectorComp(double comp1, double comp2, double comp3)
           
 void setVectorComp(int n, double comp)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_ref_coord

protected Coord3D _ref_coord

_vec

protected double[] _vec
Constructor Detail

Direction

protected Direction(BaseSRF srf,
                    Coord3D ref_coord,
                    double[] vec)
Constructor, requires an SRF, 3 reference coordinate values, and 3 direction values.

Method Detail

getSRF

public BaseSRF getSRF()

getRefCoord

public Coord3D getRefCoord()
                    throws SrmException
Throws:
SrmException

getVec

public double[] getVec()

getVectorComp1

public double getVectorComp1()

getVectorComp2

public double getVectorComp2()

getVectorComp3

public double getVectorComp3()

getVectorComp

public double getVectorComp(int n)
                     throws SrmException
Return the values of the Nth direction vector component.

Throws:
SrmException

setVec

public void setVec(double[] vec)
            throws SrmException
Throws:
SrmException

setVectorComp

public void setVectorComp(double comp1,
                          double comp2,
                          double comp3)

setVectorComp

public void setVectorComp(int n,
                          double comp)
                   throws SrmException
Throws:
SrmException

copyTo

public void copyTo(Direction dir)
            throws SrmException
Copies the vector component values of this direction to the input direction.

Throws:
SrmException

makeClone

public Direction makeClone()
                    throws SrmException
Returns the shallow copy of this object instance.

Throws:
SrmException

isEqual

public boolean isEqual(Direction dir)
Returns TRUE if the Direction parameters are "Equal"


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInternalRefCoord

protected Coord3D getInternalRefCoord()