org.jzy3d.plot3d.primitives
Class LineStrip
java.lang.Object
org.jzy3d.plot3d.primitives.AbstractDrawable
org.jzy3d.plot3d.primitives.AbstractWireframeable
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:
- If wireframe color is null (default), uses each point color and performs
color interpolation
- Otherwise apply a uniform wireframe color.
- Author:
- Martin Pernollet
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 |
points
protected List<Point> points
width
protected float width
showPoints
protected boolean showPoints
LineStrip
public LineStrip()
LineStrip
public LineStrip(int n)
LineStrip
public LineStrip(List<Coord3d> coords)
LineStrip
public LineStrip(Point c1,
Point c2)
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 contextglu
- GLU contextcam
- 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.