com.metsci.glimpse.painter.shape
Class LineSetPainter
java.lang.Object
com.metsci.glimpse.painter.base.GlimpsePainterImpl
com.metsci.glimpse.painter.base.GlimpsePainter2D
com.metsci.glimpse.painter.base.GlimpseDataPainter2D
com.metsci.glimpse.painter.shape.LineSetPainter
- All Implemented Interfaces:
- GlimpsePainter
- Direct Known Subclasses:
- FunctionPlotExample.Function1DPainter
public class LineSetPainter
- extends GlimpseDataPainter2D
Efficiently draws a static set of line segments. Can also efficiently
query for the line segments contained in a particular region of the
plot using a QuadTree
.
- Author:
- ulman
Method Summary |
void |
dispose(javax.media.opengl.GLContext context)
|
void |
paintTo(javax.media.opengl.GL gl,
GlimpseBounds bounds,
Axis2D axis)
|
void |
setData(float[][] dataX,
float[][] dataY)
Adds multiple tracks containing series of (x,y) positions to be painter. |
void |
setData(float[] dataX,
float[] dataY)
|
void |
setLineColor(float[] color)
|
void |
setLineColor(float r,
float g,
float b,
float a)
|
void |
setLineWidth(float width)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QUAD_TREE_BIN_MAX
public static final int QUAD_TREE_BIN_MAX
- See Also:
- Constant Field Values
LineSetPainter
public LineSetPainter()
LineSetPainter
public LineSetPainter(boolean enableSpatialIndex)
setData
public void setData(float[] dataX,
float[] dataY)
setData
public void setData(float[][] dataX,
float[][] dataY)
- Adds multiple tracks containing series of (x,y) positions to be painter. The
positions of a single track are connected by lines.
dataX[0] is an array containing the x coordinates of the positions in track id 0.
dataX[0][0] is the x coordinate of point id 0 in track id 0.
The ids are used when making spatial or temporal queries on this painter.
- Parameters:
dataX
- x coordinate data for all points in all tracksdataY
- y coordinate data for all points in all tracks
setLineColor
public void setLineColor(float r,
float g,
float b,
float a)
setLineColor
public void setLineColor(float[] color)
setLineWidth
public void setLineWidth(float width)
dispose
public void dispose(javax.media.opengl.GLContext context)
paintTo
public void paintTo(javax.media.opengl.GL gl,
GlimpseBounds bounds,
Axis2D axis)
- Specified by:
paintTo
in class GlimpseDataPainter2D
Copyright © 2012 Metron, Inc.. All Rights Reserved.