org.jzy3d.plot3d.primitives.selectable
Class SelectableSphere

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.AbstractDrawable
      extended by org.jzy3d.plot3d.primitives.AbstractWireframeable
          extended by org.jzy3d.plot3d.primitives.Sphere
              extended by org.jzy3d.plot3d.primitives.selectable.SelectableSphere
All Implemented Interfaces:
ISingleColorable, IGLRenderer, ISortableDraw, Selectable

public class SelectableSphere
extends Sphere
implements Selectable


Field Summary
protected  List<Coord3d> anchors
           
protected  boolean isHighlighted
           
protected  int PRECISION
           
protected  List<Coord3d> projection
           
 
Fields inherited from class org.jzy3d.plot3d.primitives.Sphere
color, glut, position, radius, slices, stacks
 
Fields inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable
facestatus, wfcolor, wfstatus, wfwidth
 
Fields inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
bbox, displayed, hasListeners, legend, legendDisplayed, listeners, transform
 
Constructor Summary
SelectableSphere()
           
SelectableSphere(Coord3d position, float radius, int slicing, Color color)
           
 
Method Summary
protected  void buildAnchors()
           
protected  List<Coord3d> buildAnchors(Coord3d position, float radius)
           
 void draw(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL2 routines for rendering the object.
 Polygon getHull2d()
           
 List<Coord3d> getLastProjection()
           
 List<Coord3d> getProjection()
           
 boolean isHighlighted()
           
 void project(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu, Camera cam)
           
 void resetHighlighting()
           
 void setHighlighted(boolean value)
           
 void setPosition(Coord3d position)
          Set the position of the Sphere and the dimensions of its boundingbox.
 void setVolume(float radius)
          Set the radius of the sphere, and the dimensions of its boundingbox.
 
Methods inherited from class org.jzy3d.plot3d.primitives.Sphere
getColor, getPosition, setColor, setData, setSlicing, toString, updateBounds
 
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable
getFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth, setFaceDisplayed, setWireframeColor, setWireframeDisplayed, setWireframeWidth
 
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable
addDrawableListener, call, call, callWithAlphaFactor, dispose, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getTransform, hasLegend, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

anchors

protected List<Coord3d> anchors

PRECISION

protected int PRECISION

isHighlighted

protected boolean isHighlighted

projection

protected List<Coord3d> projection
Constructor Detail

SelectableSphere

public SelectableSphere()

SelectableSphere

public SelectableSphere(Coord3d position,
                        float radius,
                        int slicing,
                        Color color)
Method Detail

draw

public void draw(javax.media.opengl.GL2 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
Overrides:
draw in class Sphere
Parameters:
gl - GL2 context
glu - GLU context
cam - a reference to a shooting Camera.

project

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

getProjection

public List<Coord3d> getProjection()

setPosition

public void setPosition(Coord3d position)
Description copied from class: Sphere
Set the position of the Sphere and the dimensions of its boundingbox. Note that this position will be use to translate the object before drawing it (meaning a glTranslate(position) is performed right after the Translate.execute).

Overrides:
setPosition in class Sphere

setVolume

public void setVolume(float radius)
Description copied from class: Sphere
Set the radius of the sphere, and the dimensions of its boundingbox.

Overrides:
setVolume in class Sphere
Parameters:
radius - sphere radius

buildAnchors

protected void buildAnchors()

buildAnchors

protected List<Coord3d> buildAnchors(Coord3d position,
                                     float radius)

getHull2d

public Polygon getHull2d()
Specified by:
getHull2d in interface Selectable

getLastProjection

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

setHighlighted

public void setHighlighted(boolean value)

isHighlighted

public boolean isHighlighted()

resetHighlighting

public void resetHighlighting()