public class EnlightablePolygon extends AbstractEnlightable
| Modifier and Type | Field and Description |
|---|---|
protected Coord3d |
center |
protected Color |
color |
protected ColorMapper |
mapper |
protected List<Point> |
points |
materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflectionfacestatus, wfcolor, wfstatus, wfwidthbbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore| Constructor and Description |
|---|
EnlightablePolygon()
Initializes an empty
Polygon with face status defaulting to true,
and wireframe status defaulting to false. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Point point)
Add a point to the polygon.
|
void |
applyGeometryTransform(Transform transform) |
void |
draw(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam)
Call OpenGL2 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. |
String |
toString(int depth) |
void |
updateBounds() |
protected void |
updateCenter() |
applyMaterial, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflectiongetFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth, setFaceDisplayed, setWireframeColor, setWireframeDisplayed, setWireframeWidthaddDrawableListener, call, call, callWithAlphaFactor, colorGL2, colorGLES2, dispose, doDrawBounds, doTransform, fireDrawableChanged, fireDrawableChanged, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, vertexGL2, vertexGLES2protected ColorMapper mapper
protected Color color
protected Coord3d center
public EnlightablePolygon()
Polygon with face status defaulting to true,
and wireframe status defaulting to false.public void draw(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam)
AbstractDrawabledraw in interface IGLRendererdraw in class AbstractDrawablegl - GL2 contextglu - GLU contextcam - a reference to a shooting Camera.public void applyGeometryTransform(Transform transform)
applyGeometryTransform in class AbstractDrawablepublic void updateBounds()
updateBounds in class AbstractDrawableprotected void updateCenter()
public void add(Point point)
public boolean hasAlpha()
public Coord3d getBarycentre()
AbstractDrawableCoord3d.INVALIDgetBarycentre in class AbstractDrawableCoord3d.INVALID.public int size()
Polygon.public void setColorMapper(ColorMapper mapper)
public ColorMapper getColorMapper()
public void setColor(Color color)
public Color getColor()
public String toString(int depth)
toString in class AbstractDrawableCopyright © 2016. All rights reserved.