Package org.jzy3d.plot3d.primitives
Class LineStrip
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Wireframeable
-
- org.jzy3d.plot3d.primitives.LineStrip
-
- All Implemented Interfaces:
IGLRenderer
,ISortableDraw
- Direct Known Subclasses:
CameraPathAnnotation
,ConcurrentLineStrip
,CroppableLineStrip
,ParametricDrawable
,ParametricDrawable2
public class LineStrip extends Wireframeable
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
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Point>
points
protected boolean
showPoints
protected boolean
showSymbols
protected boolean
stipple
protected int
stippleFactor
protected short
stipplePattern
protected SymbolHandler
symbolHandler
-
Fields inherited from class org.jzy3d.plot3d.primitives.Wireframeable
depthFunctionChangeForWireframe, faceDisplayed, materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflection, NO_OVERLAP_DEPTH_RATIO, polygonOffsetFactor, polygonOffsetFillEnable, polygonOffsetUnit, polygonWireframeDepthTrick, reflectLight, wireframeColor, wireframeColorFromPolygonPoints, wireframeDisplayed, wireframeWidth, wireframeWithLineLoop
-
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Collection<Coord3d> coords)
void
add(Coord3d coord3d)
void
add(Point point)
void
add(Point point, boolean updateBounds)
void
addAll(Collection<Point> points)
void
addAll(LineStrip strip)
void
addAllPoints(Collection<Coord3d> coords)
void
applyGeometryTransform(Transform transform)
void
clear()
void
draw(IPainter painter)
Call OpenGL2 routines for rendering the object.void
drawLine(IPainter painter)
void
drawPoints(IPainter painter)
void
drawPointsIfEnabled(IPainter painter)
Point
get(int p)
Color
getColor()
A convenient shortcut forWireframeable.getWireframeColor()
double
getDistance(Camera camera)
Return the distance of the object center to theCamera
's eye.Point
getLastPoint()
double
getLongestDistance(Camera camera)
List<Point>
getPoints()
double
getShortestDistance(Camera camera)
int
getStippleFactor()
Stippled line factor.short
getStipplePattern()
Stippled line pattern.SymbolHandler
getSymbolHandler()
float
getWidth()
A shortcut forWireframeable.getWireframeWidth()
boolean
isShowPoints()
boolean
isShowSymbols()
boolean
isStipple()
Indicates if stippled rendering is enabled for this line.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-Bvoid
setColor(Color color)
A convenient shortcut forsetWireframeColor(org.jzy3d.colors.Color)
void
setShowPoints(boolean showPoints)
void
setShowSymbols(boolean showSymbols)
void
setSpaceTransformer(SpaceTransformer spaceTransformer)
void
setStipple(boolean stipple)
Enable or disable stippled rendering.void
setStippleFactor(int stippleFactor)
Stippled line factor.void
setStipplePattern(short stipplePattern)
Stippled line pattern.void
setSymbolHandler(SymbolHandler symbolHandler)
void
setWidth(float width)
A shortcut forWireframeable.setWireframeWidth(float)
void
setWireframeColor(Color color)
Set the wireframe color.int
size()
String
toString(int depth)
void
updateBounds()
-
Methods inherited from class org.jzy3d.plot3d.primitives.Wireframeable
applyDepthRangeDefault, applyDepthRangeForOverlying, applyDepthRangeForUnderlying, applyMaterial, doDrawBoundsIfDisplayed, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, getPolygonOffsetFactor, getPolygonOffsetUnit, getWireframeColor, getWireframeWidth, isFaceDisplayed, isPolygonOffsetFillEnable, isPolygonWireframeDepthTrick, isReflectLight, isWireframeColorFromPolygonPoints, isWireframeDisplayed, polygonOffsetFillDisable, polygonOffsetFillEnable, polygonOffsetLineDisable, polygonOffsetLineEnable, setFaceDisplayed, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection, setPolygonOffsetFactor, setPolygonOffsetFillEnable, setPolygonOffsetUnit, setPolygonWireframeDepthTrick, setReflectLight, setWireframeColorFromPolygonPoints, setWireframeDisplayed, setWireframeWidth
-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getLegend, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setTransform, setTransformBefore, toString
-
-
-
-
Field Detail
-
showPoints
protected boolean showPoints
-
showSymbols
protected boolean showSymbols
-
stipple
protected boolean stipple
-
stippleFactor
protected int stippleFactor
-
stipplePattern
protected short stipplePattern
-
symbolHandler
protected SymbolHandler symbolHandler
-
-
Method Detail
-
setWireframeColor
public void setWireframeColor(Color color)
Set the wireframe color.- Overrides:
setWireframeColor
in classWireframeable
-
setColor
public void setColor(Color color)
A convenient shortcut forsetWireframeColor(org.jzy3d.colors.Color)
- Parameters:
color
-
-
getColor
public Color getColor()
A convenient shortcut forWireframeable.getWireframeColor()
-
draw
public void draw(IPainter painter)
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
drawLine
public void drawLine(IPainter painter)
-
drawPointsIfEnabled
public void drawPointsIfEnabled(IPainter painter)
-
drawPoints
public void drawPoints(IPainter painter)
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in classDrawable
-
add
public void add(Point point)
-
add
public void add(Point point, boolean updateBounds)
-
add
public void add(Coord3d coord3d)
-
add
public void add(Collection<Coord3d> coords)
-
addAll
public void addAll(Collection<Point> points)
-
addAll
public void addAll(LineStrip strip)
-
addAllPoints
public void addAllPoints(Collection<Coord3d> coords)
-
clear
public void clear()
-
get
public Point get(int p)
-
getLastPoint
public Point getLastPoint()
-
size
public int size()
-
setWidth
public void setWidth(float width)
A shortcut forWireframeable.setWireframeWidth(float)
-
getWidth
public float getWidth()
A shortcut forWireframeable.getWireframeWidth()
-
isShowPoints
public boolean isShowPoints()
-
setShowPoints
public void setShowPoints(boolean showPoints)
-
isShowSymbols
public boolean isShowSymbols()
-
setShowSymbols
public void setShowSymbols(boolean showSymbols)
-
isStipple
public boolean isStipple()
Indicates if stippled rendering is enabled for this line.
-
setStipple
public void setStipple(boolean stipple)
Enable or disable stippled rendering.
-
getStippleFactor
public int getStippleFactor()
Stippled line factor.
-
setStippleFactor
public void setStippleFactor(int stippleFactor)
Stippled line factor.
-
getStipplePattern
public short getStipplePattern()
Stippled line pattern.
-
setStipplePattern
public void setStipplePattern(short stipplePattern)
Stippled line pattern.
-
getDistance
public double getDistance(Camera camera)
Description copied from class:Drawable
Return the distance of the object center to theCamera
's eye.- Specified by:
getDistance
in interfaceISortableDraw
- Overrides:
getDistance
in classDrawable
-
getShortestDistance
public double getShortestDistance(Camera camera)
- Specified by:
getShortestDistance
in interfaceISortableDraw
- Overrides:
getShortestDistance
in classDrawable
-
getLongestDistance
public double getLongestDistance(Camera camera)
- Specified by:
getLongestDistance
in interfaceISortableDraw
- Overrides:
getLongestDistance
in classDrawable
-
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
-
getSymbolHandler
public SymbolHandler getSymbolHandler()
-
setSymbolHandler
public void setSymbolHandler(SymbolHandler symbolHandler)
-
setSpaceTransformer
public void setSpaceTransformer(SpaceTransformer spaceTransformer)
- Overrides:
setSpaceTransformer
in classDrawable
-
-