org.jzy3d.plot3d.primitives
Class LineStrip

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.AbstractDrawable
      extended by org.jzy3d.plot3d.primitives.AbstractWireframeable
          extended by org.jzy3d.plot3d.primitives.LineStrip
All Implemented Interfaces:
IGLRenderer, ISortableDraw

public class LineStrip
extends AbstractWireframeable

Color works as follow:

Author:
Martin Pernollet

Field Summary
protected  List<Point> points
           
protected  float width
           
 
Fields inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable
facestatus, wfcolor, wfstatus, wfwidth
 
Fields inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
bbox, displayed, hasListeners, legend, legendDisplayed, listeners, transform
 
Constructor Summary
LineStrip()
           
LineStrip(int n)
           
LineStrip(List<Coord3d> coords)
           
 
Method Summary
 void add(Point point)
           
 void addAll(LineStrip strip)
           
 void addAll(List<Point> points)
           
 void draw(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL2 routines for rendering the object.
 Point get(int p)
           
 double getDistance(Camera camera)
          Return the distance of the object center to the Camera's eye.
 double getLongestDistance(Camera camera)
           
 List<Point> getPoints()
           
 double getShortestDistance(Camera camera)
           
static LineStrip merge(LineStrip strip1, LineStrip strip2)
          Merge lines by selecting the most relevant connection point: A-B to C-D if distance BC is shorter than distance DA C-D to A-B
 void setWidth(float width)
           
 int size()
           
 String toString(int depth)
           
 
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable
getFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth, setFaceDisplayed, setWireframeColor, setWireframeDisplayed, setWireframeWidth
 
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, call, call, callWithAlphaFactor, dispose, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBounds, getLegend, getTransform, hasLegend, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

points

protected List<Point> points

width

protected float width
Constructor Detail

LineStrip

public LineStrip()

LineStrip

public LineStrip(int n)

LineStrip

public LineStrip(List<Coord3d> coords)
Method Detail

draw

public void draw(javax.media.opengl.GL2 gl,
                 javax.media.opengl.glu.GLU glu,
                 Camera cam)
Description copied from class: AbstractDrawable
Call OpenGL2 routines for rendering the object.

Specified by:
draw in interface IGLRenderer
Specified by:
draw in class AbstractDrawable
Parameters:
gl - GL2 context
glu - GLU context
cam - a reference to a shooting Camera.

add

public void add(Point point)

addAll

public void addAll(List<Point> points)

addAll

public void addAll(LineStrip strip)

get

public Point get(int p)

getPoints

public List<Point> getPoints()

size

public int size()

setWidth

public void setWidth(float width)

getDistance

public double getDistance(Camera camera)
Description copied from class: AbstractDrawable
Return the distance of the object center to the Camera's eye.

Specified by:
getDistance in interface ISortableDraw
Overrides:
getDistance in class AbstractDrawable

getShortestDistance

public double getShortestDistance(Camera camera)
Specified by:
getShortestDistance in interface ISortableDraw
Overrides:
getShortestDistance in class AbstractDrawable

getLongestDistance

public double getLongestDistance(Camera camera)
Specified by:
getLongestDistance in interface ISortableDraw
Overrides:
getLongestDistance in class AbstractDrawable

merge

public static LineStrip merge(LineStrip strip1,
                              LineStrip strip2)
Merge lines by selecting the most relevant connection point: A-B to C-D if distance BC is shorter than distance DA C-D to A-B


toString

public String toString(int depth)
Overrides:
toString in class AbstractDrawable