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:
ISingleColorable, IGLRenderer, ISortableDraw, IWireframeable

public class LineStrip
extends AbstractWireframeable
implements ISingleColorable


Constructor Summary
LineStrip()
           
LineStrip(int n)
           
LineStrip(java.util.List<Coord3d> coords)
           
 
Method Summary
 void add(Point point)
           
 void addAll(LineStrip strip)
           
 void addAll(java.util.List<Point> points)
           
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL routines for rendering the object.
 Point get(int p)
           
 Color getColor()
          Get the color.
 double getDistance(Camera camera)
          Return the distance of the object center to the Camera's eye.
 double getLongestDistance(Camera camera)
           
 java.util.List<Point> getPoints()
           
 double getShortestDistance(Camera camera)
           
 float getWidth()
           
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 setColor(Color color)
          Apply the given color to the line strip, or make an interpolated color between each point according to the point color if the input color is null.
 void setWidth(float width)
           
 int size()
           
 java.lang.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, dispose, getBarycentre, getBounds, getFace, getTransform, hasFace, isDisplayed, isFace2dDisplayed, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineStrip

public LineStrip()

LineStrip

public LineStrip(int n)

LineStrip

public LineStrip(java.util.List<Coord3d> coords)
Method Detail

draw

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

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

add

public void add(Point point)

addAll

public void addAll(java.util.List<Point> points)

addAll

public void addAll(LineStrip strip)

get

public Point get(int p)

getPoints

public java.util.List<Point> getPoints()

size

public int size()

getWidth

public float getWidth()

setWidth

public void setWidth(float width)

setColor

public void setColor(Color color)
Apply the given color to the line strip, or make an interpolated color between each point according to the point color if the input color is null.

Specified by:
setColor in interface ISingleColorable
Parameters:
color - the color

getColor

public Color getColor()
Description copied from interface: ISingleColorable
Get the color.

Specified by:
getColor in interface ISingleColorable
Returns:
color the color.

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 java.lang.String toString(int depth)
Overrides:
toString in class AbstractDrawable