public abstract class ColorSurfaceData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected double[][] |
gridData
The values on the 2D grid.
|
protected int |
nX |
protected int |
nY |
protected double |
x_max |
protected double |
x_min |
protected double |
x_step |
protected double |
y_max |
protected double |
y_min |
protected double |
y_step |
protected double |
z_max |
protected double |
z_min |
Constructor and Description |
---|
ColorSurfaceData(int nX,
int nY)
The data set constructor with size of the grid.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double x,
double y)
Bins value into the 2D array for x and y with weight = 1.
|
abstract void |
addValue(double x,
double y,
double value)
Bins value into the 2D array for x and y with weight = value.
|
void |
calcMaxMinZ()
Calculates minimal and maximal Z values.
|
java.awt.Color |
getColor(double x,
double y)
Returns the color for (x,y) point.
|
ColorGenerator |
getColorGenerator()
Returns the color generator instance.
|
double |
getMaxX()
Returns the maximal X value of the grid.
|
double |
getMaxY()
Returns the maximal Y value of the grid.
|
double |
getMaxZ()
Returns the maximal Z value.
|
double |
getMinX()
Returns the minimal X value of the grid.
|
double |
getMinY()
Returns the minimal Y value of the grid.
|
double |
getMinZ()
Returns the minimal Z value.
|
int |
getScreenSizeX()
Returns the horizontal screen resolution.
|
int |
getScreenSizeY()
Returns the vertical screen resolution.
|
int |
getSizeX()
Returns the X size of the 2D array.
|
int |
getSizeY()
Returns the Y size of the 2D array.
|
abstract double |
getValue(double x,
double y)
Returns the interpolated value of the 2D array for x and y.
|
double |
getValue(int i,
int j)
Returns the value of the 2D array with indexes i and j.
|
double |
getX(int i)
Returns the X value of the grid for the index i.
|
double |
getY(int j)
Returns the Y value of the grid for the index j.
|
void |
multiplyBy(double value)
Multiplies all values of the 2D array by constant factor = value.
|
void |
setColorGenerator(ColorGenerator colorGen)
Sets the color generator.
|
void |
setMinMaxX(double x_min,
double x_max)
Sets the minimal maximal X value of the grid.
|
void |
setMinMaxY(double y_min,
double y_max)
Sets the minimal maximal Y value of the grid.
|
void |
setScreenResolution(int nScreenX,
int nScreenY)
Sets the screen resolution.
|
void |
setSize(int nX,
int nY)
Sets data size.
|
void |
setValue(int i,
int j,
double value)
Sets value of the 2D array with indexes i and j.
|
void |
setZero()
Sets all values of the 2D array to 0.
|
protected double[][] gridData
protected int nX
protected int nY
protected double x_step
protected double y_step
protected double x_min
protected double x_max
protected double y_min
protected double y_max
protected double z_min
protected double z_max
public ColorSurfaceData(int nX, int nY)
public void setColorGenerator(ColorGenerator colorGen)
public ColorGenerator getColorGenerator()
public void setSize(int nX, int nY)
public void setScreenResolution(int nScreenX, int nScreenY)
public int getScreenSizeX()
public int getScreenSizeY()
public int getSizeX()
public int getSizeY()
public double getX(int i)
public double getY(int j)
public double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()
public double getMinZ()
public double getMaxZ()
public void setMinMaxX(double x_min, double x_max)
public void setMinMaxY(double y_min, double y_max)
public void setZero()
public void setValue(int i, int j, double value)
public double getValue(int i, int j)
public abstract double getValue(double x, double y)
public abstract void addValue(double x, double y, double value)
public void addValue(double x, double y)
public void multiplyBy(double value)
public void calcMaxMinZ()
public java.awt.Color getColor(double x, double y)