gov.noaa.pmel.sgt
Class LinearTransform

java.lang.Object
  |
  +--gov.noaa.pmel.sgt.AxisTransform
        |
        +--gov.noaa.pmel.sgt.LinearTransform
All Implemented Interfaces:
java.lang.Cloneable, Transform

public class LinearTransform
extends AxisTransform
implements java.lang.Cloneable

Performs a linear transformation on cartesian axes. If the transformtion is for space the equation is phys = a*user + b and if time is phys = at*time + bt.

Since:
1.0
Version:
$Revision: 1.8 $, $Date: 2001/02/05 23:28:46 $
Author:
Donald Denbo

Constructor Summary
LinearTransform()
          Default constructor.
LinearTransform(double p1, double p2, double u1, double u2)
          LinearTransform constructor.
LinearTransform(double p1, double p2, GeoDate t1, GeoDate t2)
          LinearTransform constructor.
LinearTransform(Range2D pr, Range2D ur)
          LinearTransform constructor.
LinearTransform(Range2D pr, SoTRange str)
          LinearTransform constructor.
LinearTransform(Range2D pr, TimeRange tr)
          LinearTransform constructor.
 
Method Summary
 AxisTransform copy()
          Create a copy of the LinearTransform.
 SoTValue getSoTTransU(double p)
          Get user transform value as a SoTValue
 GeoDate getTimeTransU(double p)
          Transform from physical coordinates to time.
 double getTransP(double u)
          Transform from user to physical coordinates.
 double getTransP(GeoDate t)
          Transform from time to physical coordinates.
 double getTransP(SoTValue v)
          Get physical value as a function of SoTValue.
 double getTransU(double p)
          Transform from physical to user coordinates.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class gov.noaa.pmel.sgt.AxisTransform
addPropertyChangeListener, getId, getRangeP, getRangeU, getSoTRangeU, getTimeRangeU, isSpace, isTime, removePropertyChangeListener, setId, setRangeP, setRangeP, setRangeU, setRangeU, setRangeU, setRangeU, setRangeU
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearTransform

public LinearTransform()
Default constructor. Creates a transform with arguments Transform(0.0, 1.0, 0.0, 1.0).

LinearTransform

public LinearTransform(double p1,
                       double p2,
                       double u1,
                       double u2)
LinearTransform constructor. This constructor is used to define transforms that use double user values.
Parameters:
p1 - minimum value, physical coordinates
p2 - maximum value, physical coordinates
u1 - minimum value, user coordinates
u2 - maximum value, user coordinates

LinearTransform

public LinearTransform(Range2D pr,
                       Range2D ur)
LinearTransform constructor. This constructor is used to define transforms that use double user values.
Parameters:
pr - physical coordinate range
ur - user coordinate range
See Also:
Range2D

LinearTransform

public LinearTransform(double p1,
                       double p2,
                       GeoDate t1,
                       GeoDate t2)
LinearTransform constructor. This constructor is used to define transforms that use GeoDate user values.
Parameters:
p1 - minimum value, physical coordinates
p2 - maximum value, physical coordinates
t1 - minimum time
t2 - maximum time
See Also:
GeoDate

LinearTransform

public LinearTransform(Range2D pr,
                       TimeRange tr)
LinearTransform constructor. This constructor is used to define transforms that use GeoDate user values.
Parameters:
pr - physical coordinates range
tr - time range
See Also:
Range2D, TimeRange, GeoDate

LinearTransform

public LinearTransform(Range2D pr,
                       SoTRange str)
LinearTransform constructor. This constructor is used to define transforms that use SoTRange user values.
Parameters:
pr - physical coordinates range
str - space or time range
Since:
2.0
See Also:
SoTRange, Range2D
Method Detail

getTransP

public double getTransP(double u)
Transform from user to physical coordinates.
Parameters:
u - user value
Returns:
physical value

copy

public AxisTransform copy()
Create a copy of the LinearTransform.
Returns:
the copy

getTransP

public double getTransP(GeoDate t)
Transform from time to physical coordinates.
Parameters:
t - time
Returns:
user value

getTransP

public double getTransP(SoTValue v)
Description copied from class: AxisTransform
Get physical value as a function of SoTValue.
Overrides:
getTransP in class AxisTransform

getTransU

public double getTransU(double p)
Transform from physical to user coordinates.
Parameters:
p - physical value
Returns:
user value

getTimeTransU

public GeoDate getTimeTransU(double p)
Transform from physical coordinates to time.
Parameters:
p - physical value
Returns:
time value

getSoTTransU

public SoTValue getSoTTransU(double p)
Description copied from class: AxisTransform
Get user transform value as a SoTValue
Overrides:
getSoTTransU in class AxisTransform

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 
Overrides:
toString in class java.lang.Object
Following copied from class: java.lang.Object
Returns:
a string representation of the object.


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001