Class 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.
Dotted line are built using https://www.glprogramming.com/red/images/Image35.gif
Author:
Martin Pernollet
  • Field Details

    • points

      protected List<Point> points
    • showPoints

      protected boolean showPoints
    • showSymbols

      protected boolean showSymbols
    • stipple

      protected boolean stipple
    • stippleFactor

      protected int stippleFactor
    • stipplePattern

      protected short stipplePattern
    • symbolHandler

      protected SymbolHandler symbolHandler
  • Constructor Details

    • LineStrip

      public LineStrip()
    • LineStrip

      public LineStrip(int n)
    • LineStrip

      public LineStrip(Coord3d... coords)
    • LineStrip

      public LineStrip(Color color, Coord3d... coords)
    • LineStrip

      public LineStrip(List<Coord3d> coords)
    • LineStrip

      public LineStrip(Point c1, Point c2)
    • LineStrip

      public LineStrip(Point... points)
  • Method Details

    • setWireframeColor

      public void setWireframeColor(Color color)
      Set the wireframe color.
      Overrides:
      setWireframeColor in class Wireframeable
    • setColor

      public void setColor(Color color)
      Parameters:
      color -
    • getColor

      public Color getColor()
      A convenient shortcut for Wireframeable.getWireframeColor()
    • draw

      public void draw(IPainter painter)
      Description copied from class: Drawable
      Call OpenGL2 routines for rendering the object.
      Specified by:
      draw in interface IGLRenderer
      Specified by:
      draw in class Drawable
    • 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 class Drawable
    • updateBounds

      public void updateBounds()
      Specified by:
      updateBounds in class Drawable
    • 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()
    • getPoints

      public List<Point> getPoints()
    • size

      public int size()
    • setWidth

      public void setWidth(float width)
    • getWidth

      public float getWidth()
    • 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 the Camera's eye.
      Specified by:
      getDistance in interface ISortableDraw
      Overrides:
      getDistance in class Drawable
    • getShortestDistance

      public double getShortestDistance(Camera camera)
      Specified by:
      getShortestDistance in interface ISortableDraw
      Overrides:
      getShortestDistance in class Drawable
    • getLongestDistance

      public double getLongestDistance(Camera camera)
      Specified by:
      getLongestDistance in interface ISortableDraw
      Overrides:
      getLongestDistance in class Drawable
    • 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 class Drawable
    • toString

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