public class Interpolator2D extends Object
setWrapS(boolean)
for a description of this option.Modifier and Type | Field and Description |
---|---|
protected TreeMap<Double,TreeMap<Double,Double>> |
map |
protected Double |
maxS |
protected Double |
maxT |
protected Double |
maxValue |
protected Double |
minS |
protected Double |
minT |
protected Double |
minValue |
protected boolean |
wrapS |
protected boolean |
wrapT |
Constructor and Description |
---|
Interpolator2D() |
Modifier and Type | Method and Description |
---|---|
void |
addFromFile(File file) |
void |
addFromStream(InputStream is) |
void |
addValue(double s,
double t,
double r)
Adds a value to this interpolator.
|
Double |
getMaxS()
Returns the maximum first coordinate within this interpolator.
|
Double |
getMaxT()
Returns the maximum second coordinate within this interpolator.
|
Double |
getMaxValue()
Returns the maximum value within this interpolator.
|
Double |
getMinS()
Returns the minimum first coordinate within this interpolator.
|
Double |
getMinT()
Returns the minimum second coordinate within this interpolator.
|
Double |
getMinValue()
Returns the minimum value within this interpolator.
|
Double |
getValue(double s,
double t)
Determines and returns a value from this interpolator using bi-linear interpolation.
|
boolean |
isWrapS()
Indicates whether this interpolator interpolates between maximum and minimum first coordinates if a first
coordinate outside the current range of first coordinates is specified.
|
boolean |
isWrapT()
Indicates whether this interpolator interpolates between maximum and minimum second coordinates if a second
coordinate outside the current range of second coordinates is specified.
|
void |
setWrapS(boolean wrapS)
Specifies whether this interpolator interpolates between maximum and minimum first coordinates if a first
coordinate outside the current range of first coordinates is specified.
|
void |
setWrapT(boolean wrapT)
Specifies whether this interpolator interpolates between maximum and minimum second coordinates if a second
coordinate outside the current range of second coordinates is specified.
|
protected Double maxS
protected Double maxT
protected Double maxValue
protected Double minS
protected Double minT
protected Double minValue
protected boolean wrapS
protected boolean wrapT
public void addFromFile(File file) throws FileNotFoundException
FileNotFoundException
public void addFromStream(InputStream is)
public void addValue(double s, double t, double r)
s
- the value's first coordinate.t
- the value's second coordinate.r
- the value to add.public Double getMaxS()
public Double getMaxT()
public Double getMaxValue()
public Double getMinS()
public Double getMinT()
public Double getMinValue()
public Double getValue(double s, double t)
s
- the first coordinate.t
- the second coordinate.setWrapS(boolean)
,
setWrapT(boolean)
public boolean isWrapS()
setWrapS(boolean)
for a
description of wrapping and the use of this flag.public boolean isWrapT()
setWrapS(boolean)
for a
description of wrapping and the use of wrap flags.setWrapS(boolean)
public void setWrapS(boolean wrapS)
getValue(double, double)
.
The default wrap S flag is false
.wrapS
- the first coordinate's wrap flag.setWrapS(boolean)
public void setWrapT(boolean wrapT)
setWrapS(boolean)
for a
description of wrapping and the use of wrap flags.
The default T wrap flag is false
.wrapT
- the second coordinate's wrap flag.setWrapS(boolean)