jAER project on SourceForge

net.sf.jaer.util.chart
Class VectorSeries

java.lang.Object
  extended by net.sf.jaer.util.chart.Series
      extended by net.sf.jaer.util.chart.VectorSeries

public class VectorSeries
extends Series

The VectorSeries class. * A VectorSeries is a data series to store vectors. The vectors can be accessed through indices.


Field Summary
protected  int sizeX
           
protected  int sizeY
           
protected  int sizeZ
           
 
Fields inherited from class net.sf.jaer.util.chart.Series
cache, capacity, DEFAULT_CAPACITY, dimension, elementsCount, elementSize, gl, vertices
 
Constructor Summary
VectorSeries(int sizeX, int sizeY)
          Create a new VectorSeries in 2 dimensions of given size.
VectorSeries(int sizeX, int sizeY, int sizeZ)
          Create a new VectorSeries in 3 dimensions of given size.
 
Method Summary
 void draw(javax.media.opengl.GL gl, int method)
          Draw the vectors.
 void set(int position, float x, float y)
          Set a vector in the series cache.
 void set(int position, float x, float y, float z)
          Set a vector in the series cache.
 
Methods inherited from class net.sf.jaer.util.chart.Series
add, add, clear
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sizeX

protected int sizeX

sizeY

protected int sizeY

sizeZ

protected int sizeZ
Constructor Detail

VectorSeries

public VectorSeries(int sizeX,
                    int sizeY)
Create a new VectorSeries in 2 dimensions of given size.

Parameters:
sizeX - number of x points
sizeY - number of y points

VectorSeries

public VectorSeries(int sizeX,
                    int sizeY,
                    int sizeZ)
Create a new VectorSeries in 3 dimensions of given size.

Method Detail

set

public void set(int position,
                float x,
                float y)
Set a vector in the series cache.

Parameters:
position - the element number
x - the x value
y - the y value

set

public void set(int position,
                float x,
                float y,
                float z)
Set a vector in the series cache.

Parameters:
position - the element number
x - the x value
y - the y value
z - the z value

draw

public void draw(javax.media.opengl.GL gl,
                 int method)
Draw the vectors. The gl object must be always the same. method is ignored - the vectors are always drawn as lines.

Overrides:
draw in class Series
Parameters:
gl - the OpenGL context (must be identical betweeen calls)
method - the method of drawing the series line segments, e.g. GL.GL_LINE_STRIP.

jAER project on SourceForge