org.jzy3d.plot3d.primitives.interactive
Class InteractiveScatter

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.AbstractDrawable
      extended by org.jzy3d.plot3d.primitives.Scatter
          extended by org.jzy3d.plot3d.primitives.interactive.InteractiveScatter
All Implemented Interfaces:
ISingleColorable, IGLRenderer, IInteractive, ISortableDraw

public class InteractiveScatter
extends Scatter
implements ISingleColorable, IInteractive

A Scatter that supports an "highlighted status" to change selected point color

Author:
Martin Pernollet

Field Summary
 
Fields inherited from class org.jzy3d.plot3d.primitives.Scatter
colors, coordinates, rgb, width
 
Constructor Summary
InteractiveScatter(Coord3d[] coordinates, Color[] colors)
           
 
Method Summary
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL routines for rendering the object.
 Coord3d[] getData()
           
 Color getHighlightColor()
           
 boolean getHighlighted(int id)
           
 java.awt.Polygon getHull2d()
           
 java.util.List<Coord3d> getLastProjection()
           
 Coord3d[] getProjection()
           
 void project(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
           
 void resetHighlighting()
           
 void setData(Coord3d[] coordinates)
          Set the coordinates of the point.
 void setHighlightColor(Color highlightColor)
           
 void setHighlighted(int id, boolean value)
           
 
Methods inherited from class org.jzy3d.plot3d.primitives.Scatter
clear, getColor, setColor, setColors, setWidth
 
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, dispose, getBarycentre, getBounds, getDistance, getFace, getLongestDistance, getShortestDistance, getTransform, hasFace, isDisplayed, isFace2dDisplayed, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jzy3d.colors.ISingleColorable
getColor, setColor
 

Constructor Detail

InteractiveScatter

public InteractiveScatter(Coord3d[] coordinates,
                          Color[] colors)
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 OpenGL routines for rendering the object.

Specified by:
draw in interface IGLRenderer
Overrides:
draw in class Scatter
Parameters:
gl - GL context
glu - GLU context
cam - a reference to a shooting Camera.

project

public void project(javax.media.opengl.GL gl,
                    javax.media.opengl.glu.GLU glu,
                    Camera cam)
Specified by:
project in interface IInteractive

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 java.awt.Polygon getHull2d()
Specified by:
getHull2d in interface IInteractive

getLastProjection

public java.util.List<Coord3d> getLastProjection()
Specified by:
getLastProjection in interface IInteractive