public class StaticParticlePainter extends GlimpseDataPainter2D
Displays a static set of tracks with associated timestamp, x position, and y position. Unlike
TrackPainter
, each track must have an xy position for the same set of timestamps. This
allows ParticlePainter to be more efficient in this case.
The set of particles cannot be modified once ParticlePainter is constructed, but a custom time slice of
the particles may be displayed via StaticParticlePainter#displayTimeRange(long, long)
.
BYTES_PER_FLOAT, logger
Constructor and Description |
---|
StaticParticlePainter(TimeStamp[] time,
float[][] xPositions,
float[][] yPositions) |
StaticParticlePainter(TimeStamp[] time,
float[][] xPositions,
float[][] yPositions,
float[][][] colors) |
Modifier and Type | Method and Description |
---|---|
void |
displayTimeRange(long startMillis,
long endMillis) |
void |
displayTimeRange(TimeStamp startTime,
TimeStamp endTime) |
void |
paintTo(javax.media.opengl.GL2 gl,
GlimpseBounds bounds,
Axis2D axis) |
void |
setColor(float[] color) |
void |
setLineWidth(float lineWidth) |
isAlphaBlend, isLineSmooth, isPointSmooth, paintTo, setAlphaBlend, setLineSmooth, setPointSmooth
paintTo
dispose, isDisposed, isVisible, paintTo, setErrorHandling, setLookAndFeel, setVisible
public StaticParticlePainter(TimeStamp[] time, float[][] xPositions, float[][] yPositions)
public StaticParticlePainter(TimeStamp[] time, float[][] xPositions, float[][] yPositions, float[][][] colors)
time
- common array of times (each particle must have an x/y position for each time)xPositions
- square array of x positions indexed as [particleIndex][timeIndex] (second index must match size of time array)yPositions
- square array of y positions indexed as [particleIndex][timeIndex] (second index must match size of time array)colors
- color values indexed as [particleIndex][timeIndex][rgba]public void setColor(float[] color)
public void setLineWidth(float lineWidth)
public void displayTimeRange(long startMillis, long endMillis)
public void paintTo(javax.media.opengl.GL2 gl, GlimpseBounds bounds, Axis2D axis)
paintTo
in class GlimpseDataPainter2D
Copyright © 2016 Metron, Inc.. All rights reserved.