|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwindx.applications.antenna.Interpolator2D
public class Interpolator2D
Represents a 2D function defined by sample points and interpolates values within the domain of the samples. Each
sample is defined by two coordinates, (s, t) and a function value, r, such that f(s,t) = r. Once the function's
sample points are added to the interpolator, the interpolator determines values at any coordinate within the sample
domain. An option exists to interpolate outside the sample domain by wrapping from maximum back to minimum values.
See setWrapS(boolean) for a description of this option.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
Interpolator2D()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 Detail |
|---|
public Interpolator2D()
| Method Detail |
|---|
public void addFromFile(File file)
throws FileNotFoundException
FileNotFoundExceptionpublic 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)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||