visad
Class CylindricalCoordinateSystem

java.lang.Object
  extended by visad.CoordinateSystem
      extended by visad.CylindricalCoordinateSystem
All Implemented Interfaces:
Serializable

public class CylindricalCoordinateSystem
extends CoordinateSystem

CylindricalCoordinateSystem is the VisAD CoordinateSystem class for (CylRadius, CylAzimuth, CylZAxis) with a Cartesian Reference, (XAxis, YAxis, ZAxis) and with CylAzimuth in degrees.

See Also:
Serialized Form

Constructor Summary
CylindricalCoordinateSystem(RealTupleType reference)
          construct a CoordinateSystem for (radius, azimuth, zaxis) relative to a 3-D Cartesian reference; this constructor supplies units = {null, CommonUnit.Degree, null} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions
 
Method Summary
 boolean equals(Object cs)
          determine if the CoordinateSystem in question is a Cylindrical one
 double[][] fromReference(double[][] tuples)
          Convert Cartesian coordinates (x, y, z) to cylindrical coordinates (radius, azimuth, z).
 float[][] fromReference(float[][] tuples)
          Convert Cartesian coordinates (x, y, z) to cylindrical coordinates (radius, azimuth, z).
 double[][] toReference(double[][] tuples)
          Convert cylindrical coordinates (radius, azimuth, z) to Cartesian coordinates (x, y, z).
 float[][] toReference(float[][] tuples)
          Convert cylindrical coordinates (radius, azimuth, z) to Cartesian coordinates (x, y, z).
 
Methods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CylindricalCoordinateSystem

public CylindricalCoordinateSystem(RealTupleType reference)
                            throws VisADException
construct a CoordinateSystem for (radius, azimuth, zaxis) relative to a 3-D Cartesian reference; this constructor supplies units = {null, CommonUnit.Degree, null} to the super constructor, in order to ensure Unit compatibility with its use of trigonometric functions

Parameters:
reference - Cartesian reference in the order of x, y, z
Throws:
VisADException - necessary VisAD object could not be created
Method Detail

toReference

public double[][] toReference(double[][] tuples)
                       throws CoordinateSystemException
Convert cylindrical coordinates (radius, azimuth, z) to Cartesian coordinates (x, y, z). Input array must have a length of 3 and be in the correct order.

Specified by:
toReference in class CoordinateSystem
Parameters:
tuples - double array containing the radius, azimuth and z values.
Returns:
double array in Cartesian coordinates ordered as x, y, z
Throws:
CoordinateSystemException - if input array is null or wrong dimension.

fromReference

public double[][] fromReference(double[][] tuples)
                         throws CoordinateSystemException
Convert Cartesian coordinates (x, y, z) to cylindrical coordinates (radius, azimuth, z). Input array must have a length of 3 and be in the correct order.

Specified by:
fromReference in class CoordinateSystem
Parameters:
tuples - double array in Cartesian coordinates ordered as x, y, z
Returns:
double array containing the radius, azimuth and z values.
Throws:
CoordinateSystemException - if input array is null or wrong dimension.

toReference

public float[][] toReference(float[][] tuples)
                      throws CoordinateSystemException
Convert cylindrical coordinates (radius, azimuth, z) to Cartesian coordinates (x, y, z). Input array must have a length of 3 and be in the correct order.

Overrides:
toReference in class CoordinateSystem
Parameters:
tuples - float array containing the radius, azimuth and z values.
Returns:
float array in Cartesian coordinates ordered as x, y, z
Throws:
CoordinateSystemException - if input array is null or wrong dimension.

fromReference

public float[][] fromReference(float[][] tuples)
                        throws CoordinateSystemException
Convert Cartesian coordinates (x, y, z) to cylindrical coordinates (radius, azimuth, z). Input array must have a length of 3 and be in the correct order.

Overrides:
fromReference in class CoordinateSystem
Parameters:
tuples - float array in Cartesian coordinates ordered as x, y, z
Returns:
float array containing the radius, azimuth and z values.
Throws:
CoordinateSystemException - if input array is null or wrong dimension.

equals

public boolean equals(Object cs)
determine if the CoordinateSystem in question is a Cylindrical one

Specified by:
equals in class CoordinateSystem
Parameters:
cs - the CoordinateSystem in question
Returns:
true if and only if this instance equals cs.