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
Constructors Constructor and Description EnlightablePolygon()Initializes an emptyPolygonwith face status defaulting to true, and wireframe status defaulting to false.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(Point point)Add a point to the polygon.voidapplyGeometryTransform(Transform transform)voiddraw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)Call OpenGL2 routines for rendering the object.Pointget(int p)Retrieve a point from thePolygon.Coord3dgetBarycentre()Return the barycentre of this object, which is computed as the center of its bounding box.ColorgetColor()ColorMappergetColorMapper()booleanhasAlpha()voidsetColor(Color color)voidsetColorMapper(ColorMapper mapper)intsize()Indicates the number of points in thisPolygon.java.lang.StringtoString(int depth)voidupdateBounds()-
Methods inherited from class org.jzy3d.plot3d.primitives.enlightables.AbstractEnlightable
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, doTransform, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString
-
-
-
-
Constructor Detail
-
EnlightablePolygon
public EnlightablePolygon()
Initializes an emptyPolygonwith face status defaulting to true, and wireframe status defaulting to false.
-
-
Method Detail
-
draw
public void draw(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam)Description copied from class:AbstractDrawableCall OpenGL2 routines for rendering the object.- Specified by:
drawin interfaceIGLRenderer- Specified by:
drawin classAbstractDrawable- Parameters:
gl- GL2 contextglu- GLU contextcam- a reference to a shooting Camera.
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classAbstractDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classAbstractDrawable
-
add
public void add(Point point)
Add a point to the polygon.
-
hasAlpha
public boolean hasAlpha()
-
getBarycentre
public Coord3d getBarycentre()
Description copied from class:AbstractDrawableReturn 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 isCoord3d.INVALID- Overrides:
getBarycentrein classAbstractDrawable- Returns:
- the center of the bounding box, or
Coord3d.INVALID.
-
size
public int size()
Indicates the number of points in thisPolygon.- 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:
toStringin classAbstractDrawable
-
-
DMelt 3.0 © DataMelt by jWork.ORG