subscript.vis
Class VisPoints

java.lang.Object
  extended by subscript.vis.VisObject
      extended by subscript.vis.VisPoints
Direct Known Subclasses:
VisGaussian, VisGLineSegment2D, VisGPoints, VisLaserScan

public class VisPoints
extends VisObject

This class handles points rendered both as dots and as lines. Colors can be individually specified for points, or for the whole set. Points are added in batches (nominally MAXCHUNKSIZE or however big the batches passed in are); these batches are PSets. A single PSet cannot support both individually-colored points and same-colored points. When points are added one-by-one, a new PSet is started if necessary.


Constructor Summary
VisPoints()
          Create an empty set of points.
VisPoints(java.util.ArrayList<GPoint2D> ps, VisPointStyle pstyle)
          Create a set of points from a list in a given style.
VisPoints(double[] x, double[] y)
           
VisPoints(double[] x, double[] y, double[] z)
           
VisPoints(double[] x, double[] y, double[] z, int[] colors, VisPointStyle pointStyle)
           
VisPoints(double[] x, double[] y, double[] z, VisLineStyle lineStyle)
           
VisPoints(double[] x, double[] y, double[] z, VisPointStyle pointStyle)
           
VisPoints(double[] x, double[] y, double[] z, VisPointStyle pointStyle, VisLineStyle lineStyle)
           
VisPoints(double[] x, double[] y, VisLineStyle lineStyle)
           
VisPoints(double[] x, double[] y, VisPointStyle pointStyle)
           
VisPoints(double[] x, double[] y, VisPointStyle pointStyle, VisLineStyle lineStyle)
           
VisPoints(VisLineStyle lstyle)
           
VisPoints(VisPointStyle pstyle)
           
VisPoints(VisPointStyle pstyle, VisLineStyle lstyle)
          Create an empty set of points in the given styles.
 
Method Summary
 void add(double[] x, double[] y, double[] z)
           
 void add(double[] x, double[] y, double[] z, int[] colors)
           
 void add(double x, double y)
           
 void add(double x, double y, double z)
           
 void add(double x, double y, double z, int color)
           
 void add(GPoint3D p)
           
 void clear()
           
 Box3D getExtents(Matrix S)
          Get the bounding box in global coordinates, i.e., using the object's transform T and the passed-in matrix S.
 GPoint3D getLast()
           
 void render(VisRenderer r, VisWorld world, VisView v)
          Called by VisCanvas when it is time to render the object.
 int size()
          Returns the number of points in this object.
 
Methods inherited from class subscript.vis.VisObject
getPosition, rotateX, rotateY, rotateZ, setPosition, setPosition, setPosition, setPositionT, setPositionXYT, setPositionXYT, setPositionXYZ, transform, transform, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisPoints

public VisPoints()
Create an empty set of points.


VisPoints

public VisPoints(java.util.ArrayList<GPoint2D> ps,
                 VisPointStyle pstyle)
Create a set of points from a list in a given style.


VisPoints

public VisPoints(VisPointStyle pstyle,
                 VisLineStyle lstyle)
Create an empty set of points in the given styles.


VisPoints

public VisPoints(VisLineStyle lstyle)

VisPoints

public VisPoints(VisPointStyle pstyle)

VisPoints

public VisPoints(double[] x,
                 double[] y)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 double[] z)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 VisPointStyle pointStyle)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 double[] z,
                 VisPointStyle pointStyle)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 VisLineStyle lineStyle)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 double[] z,
                 VisLineStyle lineStyle)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 VisPointStyle pointStyle,
                 VisLineStyle lineStyle)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 double[] z,
                 VisPointStyle pointStyle,
                 VisLineStyle lineStyle)

VisPoints

public VisPoints(double[] x,
                 double[] y,
                 double[] z,
                 int[] colors,
                 VisPointStyle pointStyle)
Method Detail

add

public void add(double[] x,
                double[] y,
                double[] z,
                int[] colors)

add

public void add(double[] x,
                double[] y,
                double[] z)

add

public void add(double x,
                double y)

add

public void add(GPoint3D p)

clear

public void clear()

size

public int size()
Returns the number of points in this object.


getLast

public GPoint3D getLast()

add

public void add(double x,
                double y,
                double z)

add

public void add(double x,
                double y,
                double z,
                int color)

getExtents

public Box3D getExtents(Matrix S)
Description copied from class: VisObject
Get the bounding box in global coordinates, i.e., using the object's transform T and the passed-in matrix S. I.e., pass S*T to methods of Box3D.

Specified by:
getExtents in class VisObject

render

public void render(VisRenderer r,
                   VisWorld world,
                   VisView v)
Description copied from class: VisObject
Called by VisCanvas when it is time to render the object.

Specified by:
render in class VisObject