|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cts.cs.CoordinateSystem
public class CoordinateSystem
A CoordinateSystem is a set of ordered Axis defining how coordinates
assigned to a point have to be interpreted.
| Constructor Summary | |
|---|---|
CoordinateSystem(Axis[] axes,
Unit[] units)
Create a new Coordinate System from an array of Axis |
|
| Method Summary | |
|---|---|
String |
format(double[] coord)
Return a String representation of this coordinate in this CoordinateSystem. |
Axis |
getAxis(int i)
Return the Axis with index i of this CoordinateSystem. |
int |
getDimension()
Return the axes number of this CoordinateSystem. |
int |
getIndex(Axis axis)
Return the index of Axis axis or -1 if axis is not part of this
CoordinateSystem. |
Unit |
getUnit(int i)
Return the Unit for Axis with index i of this CoordinateSystem. |
String |
toString()
Return a String representation of this CoordinateSystem. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CoordinateSystem(Axis[] axes,
Unit[] units)
Axis
axes - the array of axes defining this CoordinateSystemunits - the units used by coordinates, defined in the same order as
axes.| Method Detail |
|---|
public Axis getAxis(int i)
throws ArrayIndexOutOfBoundsException
Axis with index i of this CoordinateSystem.
i - index of the Axis to return
ArrayIndexOutOfBoundsException
public Unit getUnit(int i)
throws ArrayIndexOutOfBoundsException
Unit for Axis with index i of this CoordinateSystem.
i - index of the Axis for which Unit is returned
ArrayIndexOutOfBoundsExceptionpublic int getDimension()
public int getIndex(Axis axis)
Axis axis or -1 if axis is not part of this
CoordinateSystem. If there is many axes of the CoordinateSystem equals to
the axis in argument, the minimum index of these axes is returned.
axis - the axis whose index is looked for
public String format(double[] coord)
throws CoordinateDimensionException
CoordinateSystem.
coord - the coordinate to format
CoordinateDimensionExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||