Class SelectableScatter

java.lang.Object
org.jzy3d.plot3d.primitives.Drawable
org.jzy3d.plot3d.primitives.Scatter
org.jzy3d.plot3d.primitives.selectable.SelectableScatter
All Implemented Interfaces:
ISingleColorable, IGLRenderer, ISortableDraw, Selectable

public class SelectableScatter extends Scatter implements ISingleColorable, Selectable
A Scatter that supports an "highlighted status" to change selected point color
Author:
Martin Pernollet
  • Field Details

    • isHighlighted

      protected boolean[] isHighlighted
    • highlightColor

      protected Color highlightColor
    • projection

      protected Coord3d[] projection
  • Constructor Details

    • SelectableScatter

      public SelectableScatter(Coord3d[] coordinates, Color[] colors)
  • Method Details

    • draw

      public void draw(IPainter painter)
      Description copied from class: Drawable
      Call OpenGL2 routines for rendering the object.
      Specified by:
      draw in interface IGLRenderer
      Overrides:
      draw in class Scatter
    • project

      public void project(IPainter painter, Camera cam)
      Specified by:
      project in interface Selectable
    • getProjection

      public Coord3d[] getProjection()
    • getHighlightColor

      public Color getHighlightColor()
    • setHighlightColor

      public void setHighlightColor(Color highlightColor)
    • setHighlighted

      public void setHighlighted(int id, boolean value)
    • getHighlighted

      public boolean getHighlighted(int id)
    • resetHighlighting

      public void resetHighlighting()
    • setData

      public void setData(Coord3d[] coordinates)
      Set the coordinates of the point.
      Overrides:
      setData in class Scatter
      Parameters:
      xyz - point's coordinates
    • getData

      public Coord3d[] getData()
      Overrides:
      getData in class Scatter
    • getHull2d

      public Polygon2d getHull2d()
      Specified by:
      getHull2d in interface Selectable
    • getLastProjection

      public List<Coord3d> getLastProjection()
      Specified by:
      getLastProjection in interface Selectable