org.jscience.physics.solids.geom
Class AtlasCoordSys

java.lang.Object
  extended by org.jscience.physics.solids.AtlasObject
      extended by org.jscience.physics.solids.geom.AtlasCoordSys
All Implemented Interfaces:
java.lang.Comparable

public class AtlasCoordSys
extends AtlasObject

Basic coordinate system definition.

Right now, everything is a "get" from this class. This is to prevent confusion when modifying the CS object: for example, if a Position references a CS, and the origin of that CS changes, should the point also move in space?


Field Summary
static java.lang.String CARTESIAN
           
static java.lang.String CYLINDRICAL
           
static AtlasCoordSys GLOBAL
           
static java.lang.String SPHERICAL
           
protected static java.lang.String TYPE
           
 
Constructor Summary
AtlasCoordSys()
          Creates a new global Coordinate System.
AtlasCoordSys(AtlasPosition origin, AtlasVector xAxis, AtlasVector xyAxis)
          Creates a new coordinate system with given location and orientation.
 
Method Summary
 javax.media.j3d.Transform3D getInverseTransformation()
          Returns the inverse of the transformation.
 double[] getOrigin()
          Returns the origin of this coordinate system.
 javax.media.j3d.Transform3D getTransformation()
          Returns the transformation of this coordsys.
 java.lang.String getType()
          Returns type as "CoordSys".
 boolean isGlobal()
          Determines whether the coordsys is a global.
 java.lang.String toString()
          Convenience method that returns a summary of the object.
 
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

CARTESIAN

public static java.lang.String CARTESIAN

CYLINDRICAL

public static java.lang.String CYLINDRICAL

SPHERICAL

public static java.lang.String SPHERICAL

GLOBAL

public static final AtlasCoordSys GLOBAL
Constructor Detail

AtlasCoordSys

public AtlasCoordSys()
Creates a new global Coordinate System.


AtlasCoordSys

public AtlasCoordSys(AtlasPosition origin,
                     AtlasVector xAxis,
                     AtlasVector xyAxis)
              throws InvalidCoordSysException
Creates a new coordinate system with given location and orientation.

Throws:
InvalidCoordSysException
Method Detail

getOrigin

public double[] getOrigin()
Returns the origin of this coordinate system.


getTransformation

public javax.media.j3d.Transform3D getTransformation()
Returns the transformation of this coordsys. Note that this is a copy of the transformation ,so you can't screw up the CS.


getInverseTransformation

public javax.media.j3d.Transform3D getInverseTransformation()
Returns the inverse of the transformation.


getType

public java.lang.String getType()
Returns type as "CoordSys".

Specified by:
getType in class AtlasObject

isGlobal

public boolean isGlobal()
Determines whether the coordsys is a global.


toString

public java.lang.String toString()
Convenience method that returns a summary of the object.

Overrides:
toString in class AtlasObject