sgtplot
Class LinearTransform
- java.lang.Object
-
- sgtplot.AxisTransform
-
- sgtplot.LinearTransform
-
- All Implemented Interfaces:
- java.io.Serializable, 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
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description LinearTransform()Default constructor.LinearTransform(double p1, double p2, double u1, double u2)LinearTransformconstructor.LinearTransform(double p1, double p2, GeoDate t1, GeoDate t2)LinearTransformconstructor.LinearTransform(Range2D pr, Range2D ur)LinearTransformconstructor.LinearTransform(Range2D pr, SoTRange str)LinearTransformconstructor.LinearTransform(Range2D pr, TimeRange tr)LinearTransformconstructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AxisTransformcopy()Create a copy of theLinearTransform.longgetLongTimeTransU(double p)Transform from physical coordinates tolongrepresentation of time.SoTValuegetSoTTransU(double p)Get user transform value as aSoTValueGeoDategetTimeTransU(double p)Transform from physical coordinates to time.doublegetTransP(double u)Transform from user to physical coordinates.doublegetTransP(GeoDate t)Transform from time to physical coordinates.doublegetTransP(long t)Transform fromlongrepresentation of time to physical coordinates.doublegetTransP(SoTValue v)Get physical value as a function ofSoTValue.doublegetTransU(double p)Transform from physical to user coordinates.java.lang.StringtoString()-
Methods inherited from class sgtplot.AxisTransform
addPropertyChangeListener, getId, getRangeP, getRangeU, getSoTRangeU, getTimeRangeU, isSpace, isTime, removePropertyChangeListener, setId, setRangeP, setRangeP, setRangeU, setRangeU, setRangeU, setRangeU, setRangeU, setRangeU
-
-
-
-
Constructor Detail
-
LinearTransform
public LinearTransform()
Default constructor. Creates a transform with argumentsTransform(0.0, 1.0, 0.0, 1.0).
-
LinearTransform
public LinearTransform(double p1, double p2, double u1, double u2)LinearTransformconstructor. This constructor is used to define transforms that use double user values.- Parameters:
p1- minimum value, physical coordinatesp2- maximum value, physical coordinatesu1- minimum value, user coordinatesu2- maximum value, user coordinates
-
LinearTransform
public LinearTransform(Range2D pr, Range2D ur)
LinearTransformconstructor. This constructor is used to define transforms that use double user values.- Parameters:
pr- physical coordinate rangeur- user coordinate range- See Also:
Range2D
-
LinearTransform
public LinearTransform(double p1, double p2, GeoDate t1, GeoDate t2)LinearTransformconstructor. This constructor is used to define transforms that useGeoDateuser values.- Parameters:
p1- minimum value, physical coordinatesp2- maximum value, physical coordinatest1- minimum timet2- maximum time- See Also:
GeoDate
-
LinearTransform
public LinearTransform(Range2D pr, TimeRange tr)
LinearTransformconstructor. This constructor is used to define transforms that useGeoDateuser values.
-
-
Method Detail
-
getTransP
public double getTransP(double u)
Transform from user to physical coordinates.
-
copy
public AxisTransform copy()
Create a copy of theLinearTransform.- 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:AxisTransformGet physical value as a function ofSoTValue.- Specified by:
getTransPin classAxisTransform
-
getTransP
public double getTransP(long t)
Transform fromlongrepresentation of time to physical coordinates.- Since:
- 3.0
-
getTransU
public double getTransU(double p)
Transform from physical to user coordinates.
-
getTimeTransU
public GeoDate getTimeTransU(double p)
Transform from physical coordinates to time.- Parameters:
p- physical value- Returns:
- time value
-
getLongTimeTransU
public long getLongTimeTransU(double p)
Transform from physical coordinates tolongrepresentation of time.- Parameters:
p- physical value- Returns:
- milliseconds since 1970-01-01
- Since:
- 3.0
-
getSoTTransU
public SoTValue getSoTTransU(double p)
Description copied from class:AxisTransformGet user transform value as aSoTValue- Specified by:
getSoTTransUin classAxisTransform
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG