Package uk.ac.starlink.ttools.plot
Class ZBufferPlotVolume
- java.lang.Object
-
- uk.ac.starlink.ttools.plot.PlotVolume
-
- uk.ac.starlink.ttools.plot.ZBufferPlotVolume
-
public class ZBufferPlotVolume extends PlotVolume
PlotVolume which uses a Z-buffer to keep track of which pixels are in front. It can only render opaque markers.- Since:
- 18 Jan 2006
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZBufferPlotVolume.Workspace
Opaque workspace object for use with ZBufferPlotVolume instances.
-
Constructor Summary
Constructors Constructor Description ZBufferPlotVolume(java.awt.Component c, java.awt.Graphics g, MarkStyle[] styles, double padFactor, int[] padBorders, double fogginess, boolean hasLabels, DataColorTweaker tweaker, ZBufferPlotVolume.Workspace ws)
Constructs a new plot volume.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
Ensures that all points submitted through theplot
method have been painted on the graphics context.void
plot2d(int xp, int yp, double zd, double[] coords, int is, boolean showPoint, java.lang.String label, int nerr, int[] xoffs, int[] yoffs, double[] zerrs)
Plots an marker and optional associated error values at a given point in graphics coordinates with given additional Z coordinates.-
Methods inherited from class uk.ac.starlink.ttools.plot.PlotVolume
createFoggingTweaker, getFogger, getGraphics, getScale, getStyles, packRgba, plot3d, projectX, projectY, unpackRgba
-
-
-
-
Constructor Detail
-
ZBufferPlotVolume
public ZBufferPlotVolume(java.awt.Component c, java.awt.Graphics g, MarkStyle[] styles, double padFactor, int[] padBorders, double fogginess, boolean hasLabels, DataColorTweaker tweaker, ZBufferPlotVolume.Workspace ws)
Constructs a new plot volume.- Parameters:
c
- component on which points will be plottedg
- graphics context on which points will be plottedstyles
- array of marker styles which may be used to plotpadFactor
- minimum amount of space outside the unit cube in both dimensions - 1 means no extra spacefogginess
- thickness of fog for depth shadinghasLabels
- true if any of the points may have associated labelspadBorders
- space, additional to padFactor, to be left around the edges of the plot; order is (left,right,bottom,top)tweaker
- colour adjuster for using auxiliary axis coordsws
- workspace object
-
-
Method Detail
-
plot2d
public void plot2d(int xp, int yp, double zd, double[] coords, int is, boolean showPoint, java.lang.String label, int nerr, int[] xoffs, int[] yoffs, double[] zerrs)
Description copied from class:PlotVolume
Plots an marker and optional associated error values at a given point in graphics coordinates with given additional Z coordinates. Points with greater Z values should obscure points with lesser ones. The ordering of the error points is that required by theErrorRenderer
class.Most implementations currently ignore the Z values associated with the error points, and put everything at the depth of the central point, because it's too hard to do otherwise. Does this produce seriously confusing visualisation?
- Specified by:
plot2d
in classPlotVolume
- Parameters:
xp
- graphics space X coordinate of the central pointyp
- graphics space Y coordinate of the central pointzd
- depth of point; a point with a greaterz
should obscure a point with a lesser onecoords
- original coordinate array; as well as (redundant) x,y,z values it may contain auxiliary axis coordinatesis
- index of the style used to plot the pointshowPoint
- whether the central point is to be plottedlabel
- label for point, or nullnerr
- number of error points, or zero for no errorsxoffs
-nerr
-element array of graphics space X coordinates for error pointsyoffs
-nerr
-element array of graphics space Y coordinates for error pointszerrs
-nerr
-element array of depths for error points
-
flush
public void flush()
Description copied from class:PlotVolume
Ensures that all points submitted through theplot
method have been painted on the graphics context.- Specified by:
flush
in classPlotVolume
-
-