public class Interpolator2D
extends java.lang.Object
setWrapS(boolean)
for a description of this option.Modifier and Type | Field and Description |
---|---|
protected java.util.TreeMap<java.lang.Double,java.util.TreeMap<java.lang.Double,java.lang.Double>> |
map |
protected java.lang.Double |
maxS |
protected java.lang.Double |
maxT |
protected java.lang.Double |
maxValue |
protected java.lang.Double |
minS |
protected java.lang.Double |
minT |
protected java.lang.Double |
minValue |
protected boolean |
wrapS |
protected boolean |
wrapT |
Constructor and Description |
---|
Interpolator2D() |
Modifier and Type | Method and Description |
---|---|
void |
addFromFile(java.io.File file) |
void |
addFromStream(java.io.InputStream is) |
void |
addValue(double s,
double t,
double r)
Adds a value to this interpolator.
|
java.lang.Double |
getMaxS()
Returns the maximum first coordinate within this interpolator.
|
java.lang.Double |
getMaxT()
Returns the maximum second coordinate within this interpolator.
|
java.lang.Double |
getMaxValue()
Returns the maximum value within this interpolator.
|
java.lang.Double |
getMinS()
Returns the minimum first coordinate within this interpolator.
|
java.lang.Double |
getMinT()
Returns the minimum second coordinate within this interpolator.
|
java.lang.Double |
getMinValue()
Returns the minimum value within this interpolator.
|
java.lang.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 java.util.TreeMap<java.lang.Double,java.util.TreeMap<java.lang.Double,java.lang.Double>> map
protected java.lang.Double maxS
protected java.lang.Double maxT
protected java.lang.Double maxValue
protected java.lang.Double minS
protected java.lang.Double minT
protected java.lang.Double minValue
protected boolean wrapS
protected boolean wrapT
public void addFromFile(java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void addFromStream(java.io.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 java.lang.Double getMaxS()
public java.lang.Double getMaxT()
public java.lang.Double getMaxValue()
public java.lang.Double getMinS()
public java.lang.Double getMinT()
public java.lang.Double getMinValue()
public java.lang.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)