org.jzy3d.plot3d.primitives.enlightables
Class EnlightablePolygon

java.lang.Object
  extended by org.jzy3d.plot3d.primitives.AbstractDrawable
      extended by org.jzy3d.plot3d.primitives.AbstractWireframeable
          extended by org.jzy3d.plot3d.primitives.enlightables.Enlightable
              extended by org.jzy3d.plot3d.primitives.enlightables.EnlightablePolygon
All Implemented Interfaces:
IGLRenderer, ISortableDraw, IWireframeable

public class EnlightablePolygon
extends Enlightable


Constructor Summary
EnlightablePolygon()
          Initializes an empty Polygon with face status defaulting to true, and wireframe status defaulting to false.
 
Method Summary
 void add(Point point)
          Add a point to the polygon.
 void draw(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera cam)
          Call OpenGL routines for rendering the object.
 Point get(int p)
          Retrieve a point from the Polygon.
 Coord3d getBarycentre()
          Return the barycentre of this object, which is computed as the center of its bounding box.
 Color getColor()
           
 ColorMapper getColorMapper()
           
 boolean hasAlpha()
           
 void setColor(Color color)
           
 void setColorMapper(ColorMapper mapper)
           
 int size()
          Indicates the number of points in this Polygon.
 java.lang.String toString(int depth)
           
 
Methods inherited from class org.jzy3d.plot3d.primitives.enlightables.Enlightable
getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection
 
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, dispose, getBounds, getDistance, getFace, getLongestDistance, getShortestDistance, getTransform, hasFace, isDisplayed, isFace2dDisplayed, removeDrawableListener, setDisplayed, setLegend, setLegendDisplayed, setTransform, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnlightablePolygon

public EnlightablePolygon()
Initializes an empty Polygon with face status defaulting to true, and wireframe status defaulting to false.

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
Specified by:
draw in class AbstractDrawable
Parameters:
gl - GL context
glu - GLU context
cam - a reference to a shooting Camera.

add

public void add(Point point)
Add a point to the polygon.


hasAlpha

public boolean hasAlpha()

getBarycentre

public Coord3d getBarycentre()
Description copied from class: AbstractDrawable
Return the barycentre of this object, which is computed as the center of its bounding box. If the bounding box is not available, the returned value is Coord3d.INVALID

Overrides:
getBarycentre in class AbstractDrawable
Returns:
the center of the bounding box, or Coord3d.INVALID.

get

public Point get(int p)
Retrieve a point from the Polygon.

Returns:
a Point3d.

size

public int size()
Indicates the number of points in this Polygon.

Returns:
the number of points

setColorMapper

public void setColorMapper(ColorMapper mapper)

getColorMapper

public ColorMapper getColorMapper()

setColor

public void setColor(Color color)

getColor

public Color getColor()

toString

public java.lang.String toString(int depth)
Overrides:
toString in class AbstractDrawable