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
Direct Known Subclasses:
CameraPathAnnotation, ParametricDrawable, ParametricDrawable2

public class LineStrip
extends AbstractWireframeable

Color works as follow:

Author:
Martin Pernollet

Field Summary
protected  List<Point> points
           
protected  boolean showPoints
           
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, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, transform, transformBefore
 
Constructor Summary
LineStrip()
           
LineStrip(int n)
           
LineStrip(List<Coord3d> coords)
           
LineStrip(Point c1, Point c2)
           
 
Method Summary
 void add(Point point)
           
 void addAll(LineStrip strip)
           
 void addAll(List<Point> points)
           
 void applyGeometryTransform(Transform transform)
           
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL2 routines for rendering the object.
 void drawLine(javax.media.opengl.GL gl)
           
 void drawPoints(javax.media.opengl.GL gl)
           
 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)
           
 boolean isShowPoints()
           
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 setShowPoints(boolean showPoints)
           
 void setWidth(float width)
           
 int size()
           
 String toString(int depth)
           
 void updateBounds()
           
 
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, doDrawBounds, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getLegend, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setTransform, setTransformBefore, 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

showPoints

protected boolean showPoints
Constructor Detail

LineStrip

public LineStrip()

LineStrip

public LineStrip(int n)

LineStrip

public LineStrip(List<Coord3d> coords)

LineStrip

public LineStrip(Point c1,
                 Point c2)
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 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.

drawLine

public void drawLine(javax.media.opengl.GL gl)

drawPoints

public void drawPoints(javax.media.opengl.GL gl)

applyGeometryTransform

public void applyGeometryTransform(Transform transform)
Specified by:
applyGeometryTransform in class AbstractDrawable

updateBounds

public void updateBounds()
Specified by:
updateBounds in class AbstractDrawable

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)

isShowPoints

public boolean isShowPoints()

setShowPoints

public void setShowPoints(boolean showPoints)

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


Copyright © 2013. All rights reserved.