public class Surface extends Data implements Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
Surface.ZFunction
Functional representation of a surface.
|
Data.CustomMarkerFactory
Modifier and Type | Field and Description |
---|---|
static int |
SURFACE_TYPE_FLAT
Draws the surface using flat shading.
|
static int |
SURFACE_TYPE_GOURAUD
Draws the surface using Gouraud shading.
|
static int |
SURFACE_TYPE_MESH
Draws the surface as a mesh.
|
static int |
SURFACE_TYPE_NICEST
Draws the surface using the best shading available.
|
AXIS_TITLE_AT_END, AXIS_TITLE_PARALLEL, DATA_TYPE_LINE, DATA_TYPE_MARKER, DATA_TYPE_PICTURE, DATA_TYPE_TUBE, MARKER_TYPE_CUBE, MARKER_TYPE_CUSTOM, MARKER_TYPE_PLUS, MARKER_TYPE_SIMPLE_CUBE, MARKER_TYPE_SIMPLE_PLUS, MARKER_TYPE_SIMPLE_TETRAHEDRON, MARKER_TYPE_SPHERE, MARKER_TYPE_TETRAHEDRON
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG
Constructor and Description |
---|
Surface(AxisXYZ parent,
double[] x,
double[] y,
double[] z)
Creates a surface from a scattered set of 3D points.
|
Surface(AxisXYZ parent,
double[] x,
double[] y,
double[][] z)
Creates a surface from a gridded data set.
|
Surface(AxisXYZ parent,
double[] x,
double[] y,
double[][] z,
Color[][] color)
Creates a colored surface from a gridded data set.
|
Surface(AxisXYZ parent,
double[] x,
double[] y,
double[] z,
Color[] color)
Creates a surface from a scattered set of 3D points with a color given at each point.
|
Surface(AxisXYZ parent,
Surface.ZFunction zFunction,
double xmin,
double xmax,
double ymin,
double ymax)
Creates a surface from a function.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToSceneGraph(Group parent)
Called to add this object to the scene graph.
|
void |
dataRange(double[] range)
Update the data range,
range = {xmin,xmax,ymin,ymax} . |
int |
getNumberGridPointsX()
Returns the value of the "NumberGridPointsX" attribute.
|
int |
getNumberGridPointsY()
Returns the value of the "NumberGridPointsY" attribute.
|
int |
getSurfaceType()
Returns the attribute "SurfaceType".
|
void |
setNumberGridPointsX(int nx)
Sets the value of the "NumberGridPointsX" attribute.
|
void |
setNumberGridPointsY(int ny)
Sets the value of the "NumberGridPointsY" attribute.
|
void |
setSurfaceType(int surfaceType)
Sets the attribute "SurfaceType".
|
getCustomMarkerFactory, setCustomMarker, update
getAxisTitlePosition, getBoundingSphere, getChildren, getColorFunction, getConcatenatedViewport, getDataType, getLightingEnabled, getMarkerPulsingCycle, getMarkerPulsingCycleOffset, getMarkerPulsingMaximumScale, getMarkerPulsingMinimumScale, getMarkerRotatingAxis, getMarkerRotatingCycle, getMarkerRotatingCycleOffset, getMarkerType, getMaterial, getParent, getTitle, getViewport, getVirtualUniverse, getZ, setAxisTitlePosition, setBoundingSphere, setColorFunction, setDataType, setLightingEnabled, setMarkerPulsingCycle, setMarkerPulsingCycleOffset, setMarkerPulsingMaximumScale, setMarkerPulsingMinimumScale, setMarkerRotatingAxis, setMarkerRotatingCycle, setMarkerRotatingCycleOffset, setMarkerType, setMaterial, setTitle, setViewport, setViewport, setZ
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextColor, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, isBitSet, parseColor, remove, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setCustomTransform, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextColor, setTextColor, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
public static final int SURFACE_TYPE_FLAT
In a flat shaded surface, each polygon has a uniform color.
public static final int SURFACE_TYPE_GOURAUD
public static final int SURFACE_TYPE_MESH
public static final int SURFACE_TYPE_NICEST
public Surface(AxisXYZ parent, double[] x, double[] y, double[] z)
A surface is created from a scattered set of points. A function is interpolated to the given point over the rectangular area determined by that point's ranges.
parent
- an AxisXYZ object, the parent of this node.x
- is the array of x values.y
- is the array of y values.z
- is the array of z values.public Surface(AxisXYZ parent, double[] x, double[] y, double[][] z)
z[i][j]
is the z-value at
(x[i]
, y[j]
).parent
- an AxisXYZ object, the parent of this node.x
- is the array of x values.y
- is the array of y values.z
- is the two-dimensional array of z values of size
x.length
by y.length
.public Surface(AxisXYZ parent, double[] x, double[] y, double[][] z, Color[][] color)
A surface is created from a grid of points in a rectangular area.
The point z[i][j]
is the z-value at
(x[i]
, y[j]
).
parent
- an AxisXYZ object, the parent of this node.x
- is the array of x values.y
- is the array of y values.z
- is the two-dimensional array of z values.color
- is the two-dimensional array of color values.
The array must have the same size as the array z
.public Surface(AxisXYZ parent, double[] x, double[] y, double[] z, Color[] color)
A surface is created from a scattered set of points. A function is interpolated to the given point over the rectangular area determined by that point's ranges.
parent
- an AxisXYZ object, the parent of this node.x
- is the array of x values.y
- is the array of y values.z
- is the array of z values.color
- is array of color values at each point.public Surface(AxisXYZ parent, Surface.ZFunction zFunction, double xmin, double xmax, double ymin, double ymax)
parent
- an AxisXYZ object, the parent of this node.zFunction
- the function, .xmin
- the minimum x-value of the function rectangle.xmax
- the maximum x-value of the function rectangle.ymin
- the minimum y-value of the function rectangle.ymax
- the maximum y-value of the function rectangle.protected void addToSceneGraph(Group parent)
ChartNode3D
addToSceneGraph
in class Data
parent
- is the node in the scene graph at which this
object is to be added.public void dataRange(double[] range)
range = {xmin,xmax,ymin,ymax}
.
The entries in range are updated to reflect the extent of
the data in this node.
The argument range
is an input/output variable. Its value should be
updated only if the data in this node is outside the range
already in the array.public int getNumberGridPointsX()
This is the grid points in the x-direction for surfaces defined by a function.
public int getNumberGridPointsY()
This is the grid points in the y-direction for surfaces defined by a function.
public int getSurfaceType()
SURFACE_TYPE_MESH
,
SURFACE_TYPE_FLAT
,
SURFACE_TYPE_GOURAUD
,
SURFACE_TYPE_NICEST
or
SURFACE_TYPE_MESH
or-ed with one of the
other types.
Default value is SURFACE_TYPE_NICEST
.SURFACE_TYPE_MESH
,
SURFACE_TYPE_FLAT
,
SURFACE_TYPE_GOURAUD
,
SURFACE_TYPE_NICEST
public void setNumberGridPointsX(int nx)
This is the grid points in the x-direction for surfaces defined by a function.
nx
- The number of grid points in the x-direction.
Default is 40.public void setNumberGridPointsY(int ny)
This is the grid points in the y-direction for surfaces defined by a function.
ny
- The number of grid points in the y-direction.
Default is 40.public void setSurfaceType(int surfaceType)
surfaceType
- is one of
SURFACE_TYPE_MESH
,
SURFACE_TYPE_FLAT
,
SURFACE_TYPE_GOURAUD
,
SURFACE_TYPE_NICEST
or
SURFACE_TYPE_MESH
or-ed with one of the
other types.SURFACE_TYPE_MESH
,
SURFACE_TYPE_FLAT
,
SURFACE_TYPE_GOURAUD
,
SURFACE_TYPE_NICEST
Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.