com.metsci.glimpse.painter.track
Class TrackPainter
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.track.TrackPainter
- All Implemented Interfaces:
- GlimpsePainter
- Direct Known Subclasses:
- LatLonTrackPainter
public class TrackPainter
- extends GlimpseDataPainter2D
Paints groups of line segments of points with associated timestamps.
Often these points represent the locations of objects moving over time
(here referred to as a track). TrackPainter
allows very fast
selection of specified time segments within the set of tracks, hiding
all segments outside this time window.
- Author:
- ulman
- See Also:
AnimatedGeoPlotExample
Method Summary |
void |
addPoint(int trackId,
int pointId,
double x,
double y,
long time)
|
void |
addPoints(int trackId,
java.util.List<Point> points)
|
void |
addSpatialSelectionListener(Axis2D axis,
SpatialSelectionListener<Point> listener)
|
void |
addTemporalSelectionListener(TemporalSelectionListener<Point> listener)
|
void |
clearTrack(int trackId)
|
void |
deleteAll()
|
void |
deleteTrack(int trackId)
|
void |
displayTimeRange(double startTime,
double endTime)
|
void |
displayTimeRange(int trackId,
double startTime,
double endTime)
|
void |
displayTimeRange(int trackId,
long startTime,
long endTime)
|
void |
displayTimeRange(long startTime,
long endTime)
|
void |
dispose(javax.media.opengl.GLContext context)
|
void |
gcDataBuffer()
Reclaims direct host memory used to move track vertices between the host and device. |
java.util.Collection<Point> |
getGeoRange(double minX,
double maxX,
double minY,
double maxY)
|
java.util.Collection<Point> |
getTimeGeoRange(double minX,
double maxX,
double minY,
double maxY)
|
java.util.Collection<Point> |
getTimeGeoRange(double minTime,
double maxTime,
double minX,
double maxX,
double minY,
double maxY)
|
java.util.Collection<Point> |
getTimeGeoRange(long minTime,
long maxTime,
double minX,
double maxX,
double minY,
double maxY)
|
Point |
getTrackHead(int trackId)
|
java.util.Collection<Point> |
getTrackHeads()
|
void |
paintTo(javax.media.opengl.GL gl,
GlimpseBounds bounds,
Axis2D axis)
|
void |
removeTemporalSelectionListener(TemporalSelectionListener<Point> listener)
|
void |
setDotted(int trackId,
boolean dotted)
|
void |
setDotted(int trackId,
int stippleFactor,
short stipplePattern)
|
void |
setHeadPointColor(int trackId,
float[] color)
|
void |
setHeadPointColor(int trackId,
float r,
float g,
float b,
float a)
|
void |
setHeadPointSize(int trackId,
float size)
|
void |
setLabel(int trackId,
java.lang.String label)
|
void |
setLabelColor(int trackId,
float[] color)
|
void |
setLabelColor(int trackId,
float r,
float g,
float b,
float a)
|
void |
setLabelLineColor(int trackId,
float[] color)
|
void |
setLabelLineColor(int trackId,
float r,
float g,
float b,
float a)
|
void |
setLineColor(int trackId,
float[] color)
|
void |
setLineColor(int trackId,
float r,
float g,
float b,
float a)
|
void |
setLineWidth(int trackId,
float width)
|
void |
setPointColor(int trackId,
float[] color)
|
void |
setPointColor(int trackId,
float r,
float g,
float b,
float a)
|
void |
setPointSize(int trackId,
float size)
|
void |
setShowHeadPoint(int trackId,
boolean show)
|
void |
setShowLabel(int trackId,
boolean show)
|
void |
setShowLabelLine(int trackId,
boolean show)
|
void |
setShowLines(int trackId,
boolean show)
|
void |
setShowPoints(int trackId,
boolean show)
|
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
SPATIAL_SELECTION_UPDATE_RATE
public static final long SPATIAL_SELECTION_UPDATE_RATE
- See Also:
- Constant Field Values
TRACK_SIZE_ESTIMATE
public static final int TRACK_SIZE_ESTIMATE
- See Also:
- Constant Field Values
TRACK_LABEL_OFFSET_X
public static final int TRACK_LABEL_OFFSET_X
- See Also:
- Constant Field Values
TRACK_LABEL_OFFSET_Y
public static final int TRACK_LABEL_OFFSET_Y
- See Also:
- Constant Field Values
TrackPainter
public TrackPainter()
TrackPainter
public TrackPainter(boolean enableSpatialIndex)
addTemporalSelectionListener
public void addTemporalSelectionListener(TemporalSelectionListener<Point> listener)
removeTemporalSelectionListener
public void removeTemporalSelectionListener(TemporalSelectionListener<Point> listener)
addSpatialSelectionListener
public void addSpatialSelectionListener(Axis2D axis,
SpatialSelectionListener<Point> listener)
getTrackHeads
public java.util.Collection<Point> getTrackHeads()
getTrackHead
public Point getTrackHead(int trackId)
deleteAll
public void deleteAll()
deleteTrack
public void deleteTrack(int trackId)
clearTrack
public void clearTrack(int trackId)
addPoint
public void addPoint(int trackId,
int pointId,
double x,
double y,
long time)
addPoints
public void addPoints(int trackId,
java.util.List<Point> points)
setLineColor
public void setLineColor(int trackId,
float[] color)
setLineColor
public void setLineColor(int trackId,
float r,
float g,
float b,
float a)
setLineWidth
public void setLineWidth(int trackId,
float width)
setPointColor
public void setPointColor(int trackId,
float[] color)
setPointColor
public void setPointColor(int trackId,
float r,
float g,
float b,
float a)
setPointSize
public void setPointSize(int trackId,
float size)
setShowPoints
public void setShowPoints(int trackId,
boolean show)
setHeadPointColor
public void setHeadPointColor(int trackId,
float[] color)
setHeadPointColor
public void setHeadPointColor(int trackId,
float r,
float g,
float b,
float a)
setHeadPointSize
public void setHeadPointSize(int trackId,
float size)
setShowHeadPoint
public void setShowHeadPoint(int trackId,
boolean show)
setShowLines
public void setShowLines(int trackId,
boolean show)
setDotted
public void setDotted(int trackId,
boolean dotted)
setDotted
public void setDotted(int trackId,
int stippleFactor,
short stipplePattern)
setLabelColor
public void setLabelColor(int trackId,
float[] color)
setLabelColor
public void setLabelColor(int trackId,
float r,
float g,
float b,
float a)
setLabelLineColor
public void setLabelLineColor(int trackId,
float[] color)
setLabelLineColor
public void setLabelLineColor(int trackId,
float r,
float g,
float b,
float a)
setShowLabelLine
public void setShowLabelLine(int trackId,
boolean show)
setLabel
public void setLabel(int trackId,
java.lang.String label)
setShowLabel
public void setShowLabel(int trackId,
boolean show)
displayTimeRange
public void displayTimeRange(int trackId,
double startTime,
double endTime)
displayTimeRange
public void displayTimeRange(double startTime,
double endTime)
displayTimeRange
public void displayTimeRange(int trackId,
long startTime,
long endTime)
displayTimeRange
public void displayTimeRange(long startTime,
long endTime)
getGeoRange
public java.util.Collection<Point> getGeoRange(double minX,
double maxX,
double minY,
double maxY)
- Returns:
- all the Points within a specified bounding box.
getTimeGeoRange
public java.util.Collection<Point> getTimeGeoRange(double minTime,
double maxTime,
double minX,
double maxX,
double minY,
double maxY)
getTimeGeoRange
public java.util.Collection<Point> getTimeGeoRange(long minTime,
long maxTime,
double minX,
double maxX,
double minY,
double maxY)
- Returns:
- all the points within a specified bounding box which fall between the specified times.
getTimeGeoRange
public java.util.Collection<Point> getTimeGeoRange(double minX,
double maxX,
double minY,
double maxY)
- Returns:
- all the points within a specified bounding box which fall between the time
span specified for their track using displayTimeRange.
gcDataBuffer
public void gcDataBuffer()
- Reclaims direct host memory used to move track vertices between the host and device.
By default, this memory is never reclaimed because it is slow to allocate. However,
if the vertex data will not change in the near future, it may be beneficial to call
this method to free up memory in the meantime.
paintTo
public void paintTo(javax.media.opengl.GL gl,
GlimpseBounds bounds,
Axis2D axis)
- Specified by:
paintTo
in class GlimpseDataPainter2D
dispose
public void dispose(javax.media.opengl.GLContext context)
Copyright © 2012 Metron, Inc.. All Rights Reserved.