org.jscience.physics.solids.geom
Class AtlasPosition

java.lang.Object
  extended by org.jscience.physics.solids.AtlasObject
      extended by org.jscience.physics.solids.geom.AtlasPosition
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
AtlasNode

public class AtlasPosition
extends AtlasObject

A spatial location.


Field Summary
protected static java.lang.String TYPE
          DOCUMENT ME!
 
Constructor Summary
AtlasPosition()
          CRreates a point at global origin.
AtlasPosition(AtlasCoordSys cs, double x, double y, double z)
          Creates a point at the specified xyz location in the specified CS.
AtlasPosition(double x, double y, double z)
          Creates a point at the specified xyz location in the global CS.
 
Method Summary
 double computeDistance(AtlasPosition p)
          Computes the distance between the two points.
 double[] getGlobalPosition()
          Returns the location in the global coordinate system.
 java.lang.String getType()
          DOCUMENT ME!
 double getX()
          DOCUMENT ME!
 double getY()
          DOCUMENT ME!
 double getZ()
          DOCUMENT ME!
 AtlasPosition[] interpolatePoints(int numPoints, AtlasPosition otherPoint)
          Creates numPoints evenly spaced between the two nodes.
 boolean isEquivalent(AtlasPosition v, double tolerance)
          Determines whether the two vectors have the same direction
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.physics.solids.AtlasObject
compareTo, equals, getId, getParentModel, loadJDOMElement, populateGeometry, setId, setParentModel, unloadJDOMElement
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

protected static java.lang.String TYPE
DOCUMENT ME!

Constructor Detail

AtlasPosition

public AtlasPosition()
CRreates a point at global origin.


AtlasPosition

public AtlasPosition(double x,
                     double y,
                     double z)
Creates a point at the specified xyz location in the global CS.


AtlasPosition

public AtlasPosition(AtlasCoordSys cs,
                     double x,
                     double y,
                     double z)
Creates a point at the specified xyz location in the specified CS.

Method Detail

getType

public java.lang.String getType()
DOCUMENT ME!

Specified by:
getType in class AtlasObject
Returns:
DOCUMENT ME!

getGlobalPosition

public double[] getGlobalPosition()
Returns the location in the global coordinate system. The returned array is three elements long, in the order of x,y,z.

Returns:
DOCUMENT ME!

computeDistance

public double computeDistance(AtlasPosition p)
Computes the distance between the two points.

Parameters:
p - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class AtlasObject
Returns:
DOCUMENT ME!

interpolatePoints

public AtlasPosition[] interpolatePoints(int numPoints,
                                         AtlasPosition otherPoint)
Creates numPoints evenly spaced between the two nodes. ALl of the returned AtlasPositions will be in the GLOBAL coordinate system (but this might change).

Parameters:
numPoints - DOCUMENT ME!
otherPoint - DOCUMENT ME!
Returns:
DOCUMENT ME!

getX

public double getX()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getY

public double getY()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getZ

public double getZ()
DOCUMENT ME!

Returns:
DOCUMENT ME!

isEquivalent

public boolean isEquivalent(AtlasPosition v,
                            double tolerance)
Determines whether the two vectors have the same direction

Parameters:
v - DOCUMENT ME!
tolerance - DOCUMENT ME!
Returns:
DOCUMENT ME!