public abstract class AbstractGeometry extends AbstractWireframeable implements ISingleColorable, IMultiColorable
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractGeometry.PolygonMode |
| Modifier and Type | Field and Description |
|---|---|
protected Coord3d |
center |
protected Color |
color |
protected ColorMapper |
mapper |
protected List<Point> |
points |
protected AbstractGeometry.PolygonMode |
polygonMode |
protected boolean |
polygonOffsetFillEnable |
facestatus, wfcolor, wfstatus, wfwidthbbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore| Constructor and Description |
|---|
AbstractGeometry()
Initializes an empty
AbstractGeometry with face status defaulting
to true, and wireframe status defaulting to false. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Point point) |
void |
add(Point point,
boolean updateBounds)
Add a point to the polygon.
|
void |
applyGeometryTransform(Transform transform) |
protected void |
applyPolygonModeFill(com.jogamp.opengl.GL gl) |
void |
applyPolygonModeFillGL2(com.jogamp.opengl.GL gl) |
void |
applyPolygonModeFillGLES2() |
protected void |
applyPolygonModeLine(com.jogamp.opengl.GL gl) |
protected void |
applyPolygonModeLineGL2(com.jogamp.opengl.GL gl) |
protected void |
applyPolygonModeLineGLES2() |
protected abstract void |
begin(com.jogamp.opengl.GL gl) |
protected void |
callPointForWireframe(com.jogamp.opengl.GL gl)
Drawing the point list in wireframe mode if GL2 profile is available
|
protected void |
callPointsForFace(com.jogamp.opengl.GL gl)
Drawing the point list in face mode (polygon content)
|
void |
callPointsForFaceGL2(com.jogamp.opengl.GL gl)
Drawing the point list in face mode (polygon content) with GL2 profile
|
void |
callPointsForFaceGLES2(com.jogamp.opengl.GL gl)
Drawing the point list in face mode (polygon content) with GLES2 profile
|
void |
callPointsForFaceGLES2(com.jogamp.opengl.GL gl,
List<Point> points)
Drawing the point list in face mode (polygon content) with GLES2 profile
|
void |
callPointsForWireframeGL2(com.jogamp.opengl.GL gl)
Drawing the point list in wireframe mode
|
void |
draw(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam)
Call OpenGL2 routines for rendering the object.
|
protected void |
end(com.jogamp.opengl.GL gl) |
Point |
get(int p) |
Coord3d |
getBarycentre()
Return the barycentre of this object, which is computed as the center of
its bounding box.
|
Color |
getColor()
Get the color.
|
ColorMapper |
getColorMapper()
Get the colormapper.
|
double |
getDistance(Camera camera)
Return the distance of the object center to the
Camera's eye. |
double |
getLongestDistance(Camera camera) |
List<Point> |
getPoints() |
AbstractGeometry.PolygonMode |
getPolygonMode() |
double |
getShortestDistance(Camera camera) |
boolean |
isPolygonOffsetFillEnable() |
protected void |
polygonOffseFillEnable(com.jogamp.opengl.GL gl) |
protected void |
polygonOffsetFillDisable(com.jogamp.opengl.GL gl) |
void |
setColor(Color color)
Set the color.
|
void |
setColorMapper(ColorMapper mapper)
Set the colormapper that will be used by the Drawable, instead of using precomputed colors.
|
void |
setPolygonMode(AbstractGeometry.PolygonMode polygonMode)
A null polygonMode imply no any call to gl.glPolygonMode(...) at
rendering
|
static void |
setPolygonOffsetFillEnable(AbstractComposite composite,
boolean polygonOffsetFillEnable)
A utility to change polygon offset fill status of a
AbstractComposite containing AbstractGeometrys. |
void |
setPolygonOffsetFillEnable(boolean polygonOffsetFillEnable)
Enable offset fill, which let a polygon with a wireframe render cleanly
without weird depth incertainty between face and border.
|
int |
size() |
String |
toString(int depth) |
void |
updateBounds() |
getFaceDisplayed, getWireframeColor, getWireframeDisplayed, getWireframeWidth, setFaceDisplayed, setWireframeColor, setWireframeDisplayed, setWireframeWidthaddDrawableListener, call, call, callWithAlphaFactor, colorGL2, colorGLES2, dispose, doDrawBounds, doTransform, fireDrawableChanged, fireDrawableChanged, getBoundingBoxColor, getBounds, getLegend, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, vertexGL2, vertexGLES2protected AbstractGeometry.PolygonMode polygonMode
protected boolean polygonOffsetFillEnable
protected ColorMapper mapper
protected Color color
protected Coord3d center
public AbstractGeometry()
AbstractGeometry 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.protected void callPointForWireframe(com.jogamp.opengl.GL gl)
public void callPointsForWireframeGL2(com.jogamp.opengl.GL gl)
protected void callPointsForFace(com.jogamp.opengl.GL gl)
public void callPointsForFaceGLES2(com.jogamp.opengl.GL gl)
public void callPointsForFaceGLES2(com.jogamp.opengl.GL gl,
List<Point> points)
public void callPointsForFaceGL2(com.jogamp.opengl.GL gl)
protected abstract void begin(com.jogamp.opengl.GL gl)
protected void end(com.jogamp.opengl.GL gl)
protected void applyPolygonModeLine(com.jogamp.opengl.GL gl)
protected void applyPolygonModeLineGLES2()
protected void applyPolygonModeLineGL2(com.jogamp.opengl.GL gl)
protected void applyPolygonModeFill(com.jogamp.opengl.GL gl)
public void applyPolygonModeFillGLES2()
public void applyPolygonModeFillGL2(com.jogamp.opengl.GL gl)
protected void polygonOffseFillEnable(com.jogamp.opengl.GL gl)
protected void polygonOffsetFillDisable(com.jogamp.opengl.GL gl)
public void add(Point point)
public void add(Point point, boolean updateBounds)
public void applyGeometryTransform(Transform transform)
applyGeometryTransform in class AbstractDrawablepublic void updateBounds()
updateBounds in class AbstractDrawablepublic Coord3d getBarycentre()
AbstractDrawableCoord3d.INVALIDgetBarycentre in class AbstractDrawableCoord3d.INVALID.public Point get(int p)
public int size()
public double getDistance(Camera camera)
AbstractDrawableCamera's eye.getDistance in interface ISortableDrawgetDistance in class AbstractDrawablepublic double getShortestDistance(Camera camera)
getShortestDistance in interface ISortableDrawgetShortestDistance in class AbstractDrawablepublic double getLongestDistance(Camera camera)
getLongestDistance in interface ISortableDrawgetLongestDistance in class AbstractDrawablepublic AbstractGeometry.PolygonMode getPolygonMode()
public void setPolygonMode(AbstractGeometry.PolygonMode polygonMode)
public boolean isPolygonOffsetFillEnable()
public void setPolygonOffsetFillEnable(boolean polygonOffsetFillEnable)
public static void setPolygonOffsetFillEnable(AbstractComposite composite, boolean polygonOffsetFillEnable)
AbstractComposite containing AbstractGeometrys.composite - polygonOffsetFillEnable - statuspublic void setColorMapper(ColorMapper mapper)
IMultiColorablesetColorMapper in interface IMultiColorablepublic ColorMapper getColorMapper()
IMultiColorablegetColorMapper in interface IMultiColorablepublic void setColor(Color color)
ISingleColorablesetColor in interface ISingleColorablecolor - the colorpublic Color getColor()
ISingleColorablegetColor in interface ISingleColorablepublic String toString(int depth)
toString in class AbstractDrawableCopyright © 2016. All rights reserved.