org.jzy3d.plot3d.primitives.enlightables
Class EnlightablePolygon
java.lang.Object
org.jzy3d.plot3d.primitives.AbstractDrawable
org.jzy3d.plot3d.primitives.AbstractWireframeable
org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable
org.jzy3d.plot3d.primitives.enlightables.EnlightablePolygon
- All Implemented Interfaces:
- IGLRenderer, ISortableDraw
public class EnlightablePolygon
- extends AbstractEnlightable
Constructor Summary |
EnlightablePolygon()
Initializes an empty Polygon with face status defaulting to true,
and wireframe status defaulting to false. |
Methods inherited from class org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable |
applyMaterial, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection |
Methods inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable |
addDrawableListener, call, call, callWithAlphaFactor, dispose, doDrawBounds, doTransform, fireDrawableChanged, fireDrawableChanged, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setTransform, setTransformBefore, toString |
mapper
protected ColorMapper mapper
points
protected List<Point> points
color
protected Color color
center
protected Coord3d center
EnlightablePolygon
public EnlightablePolygon()
- Initializes an empty
Polygon
with face status defaulting to true,
and wireframe status defaulting to false.
draw
public void draw(javax.media.opengl.GL 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
- Specified by:
draw
in class AbstractDrawable
- Parameters:
gl
- GL2 contextglu
- GLU contextcam
- a reference to a shooting Camera.
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in class AbstractDrawable
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in class AbstractDrawable
updateCenter
protected void updateCenter()
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 String toString(int depth)
- Overrides:
toString
in class AbstractDrawable
Copyright © 2013. All rights reserved.