Class EnlightablePolygon
java.lang.Object
org.jzy3d.plot3d.primitives.Drawable
org.jzy3d.plot3d.primitives.Wireframeable
org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable
org.jzy3d.plot3d.primitives.enlightables.EnlightablePolygon
- All Implemented Interfaces:
IGLRenderer
,ISortableDraw
-
Field Summary
Fields inherited from class org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable
materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflection
Fields inherited from class org.jzy3d.plot3d.primitives.Wireframeable
depthFunctionChangeForWireframe, faceDisplayed, NO_OVERLAP_DEPTH_RATIO, polygonOffsetFactor, polygonOffsetFillEnable, polygonOffsetUnit, polygonWireframeDepthTrick, reflectLight, wireframeColor, wireframeColorFromPolygonPoints, wireframeDisplayed, wireframeWidth, wireframeWithLineLoop
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
Constructor Summary
ConstructorDescriptionInitializes an emptyPolygon
with face status defaulting to true, and wireframe status defaulting to false. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a point to the polygon.void
applyGeometryTransform
(Transform transform) void
Call OpenGL2 routines for rendering the object.get
(int p) Retrieve a point from thePolygon
.Return the barycentre of this object, which is computed as the center of its bounding box.getColor()
boolean
hasAlpha()
void
void
setColorMapper
(ColorMapper mapper) int
size()
Indicates the number of points in thisPolygon
.toString
(int depth) void
protected void
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.Wireframeable
applyDepthRangeDefault, applyDepthRangeForOverlying, applyDepthRangeForUnderlying, doDrawBoundsIfDisplayed, getPolygonOffsetFactor, getPolygonOffsetUnit, getWireframeColor, getWireframeWidth, isFaceDisplayed, isPolygonOffsetFillEnable, isPolygonWireframeDepthTrick, isReflectLight, isWireframeColorFromPolygonPoints, isWireframeDisplayed, polygonOffsetFillDisable, polygonOffsetFillEnable, polygonOffsetLineDisable, polygonOffsetLineEnable, setFaceDisplayed, setPolygonOffsetFactor, setPolygonOffsetFillEnable, setPolygonOffsetUnit, setPolygonWireframeDepthTrick, setReflectLight, setWireframeColor, setWireframeColorFromPolygonPoints, setWireframeDisplayed, setWireframeWidth
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doTransform, fireDrawableChanged, fireDrawableChanged, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString
-
Field Details
-
mapper
-
points
-
color
-
center
-
-
Constructor Details
-
EnlightablePolygon
public EnlightablePolygon()Initializes an emptyPolygon
with face status defaulting to true, and wireframe status defaulting to false.
-
-
Method Details
-
draw
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
applyGeometryTransform
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()- Specified by:
updateBounds
in classDrawable
-
updateCenter
protected void updateCenter() -
add
Add a point to the polygon. -
hasAlpha
public boolean hasAlpha() -
getBarycentre
Description copied from class:Drawable
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 isinvalid @link
Coord3d.INVALID
- Overrides:
getBarycentre
in classDrawable
- Returns:
- the center of the bounding box, or
invalid @link
Coord3d.INVALID
-
get
Retrieve a point from thePolygon
.- Returns:
- a Point3d.
-
size
public int size()Indicates the number of points in thisPolygon
.- Returns:
- the number of points
-
setColorMapper
-
getColorMapper
-
setColor
-
getColor
-
toString
-