|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jzy3d.plot3d.primitives.AbstractDrawable
org.jzy3d.plot3d.primitives.AbstractWireframeable
org.jzy3d.plot3d.primitives.AbstractGeometry
public abstract class AbstractGeometry
| Nested Class Summary | |
|---|---|
static class |
AbstractGeometry.PolygonMode
|
| Field Summary | |
|---|---|
protected Coord3d |
center
|
protected Color |
color
|
protected ColorMapper |
mapper
|
protected List<Point> |
points
|
protected AbstractGeometry.PolygonMode |
polygonMode
|
protected boolean |
polygonOffsetFillEnable
|
| Fields inherited from class org.jzy3d.plot3d.primitives.AbstractWireframeable |
|---|
facestatus, wfcolor, wfstatus, wfwidth |
| Fields inherited from class org.jzy3d.plot3d.primitives.AbstractDrawable |
|---|
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, transform, transformBefore |
| Constructor Summary | |
|---|---|
AbstractGeometry()
Initializes an empty AbstractGeometry with face status defaulting
to true, and wireframe status defaulting to false. |
|
| Method Summary | |
|---|---|
void |
add(Point point)
|
void |
add(Point point,
boolean updateBounds)
Add a point to the polygon. |
void |
applyGeometryTransform(Transform transform)
|
protected void |
applyPolygonModeFill(javax.media.opengl.GL gl)
|
protected void |
applyPolygonModeLine(javax.media.opengl.GL gl)
|
protected abstract void |
begin(javax.media.opengl.GL gl)
|
protected void |
callPointForWireframe(javax.media.opengl.GL gl)
|
protected void |
callPointsForFace(javax.media.opengl.GL gl)
|
void |
draw(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
Call OpenGL2 routines for rendering the object. |
protected void |
end(javax.media.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(javax.media.opengl.GL gl)
|
protected void |
polygonOffsetFillDisable(javax.media.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()
|
| 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, call, call, callWithAlphaFactor, dispose, doDrawBounds, doTransform, fireDrawableChanged, fireDrawableChanged, getBoundingBoxColor, getBounds, getLegend, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setTransform, setTransformBefore, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected AbstractGeometry.PolygonMode polygonMode
protected boolean polygonOffsetFillEnable
protected ColorMapper mapper
protected List<Point> points
protected Color color
protected Coord3d center
| Constructor Detail |
|---|
public AbstractGeometry()
AbstractGeometry with face status defaulting
to true, and wireframe status defaulting to false.
| Method Detail |
|---|
public void draw(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
Camera cam)
AbstractDrawable
draw in interface IGLRendererdraw in class AbstractDrawablegl - GL2 contextglu - GLU contextcam - a reference to a shooting Camera.protected void callPointForWireframe(javax.media.opengl.GL gl)
protected void callPointsForFace(javax.media.opengl.GL gl)
protected abstract void begin(javax.media.opengl.GL gl)
protected void end(javax.media.opengl.GL gl)
protected void applyPolygonModeLine(javax.media.opengl.GL gl)
protected void applyPolygonModeFill(javax.media.opengl.GL gl)
protected void polygonOffseFillEnable(javax.media.opengl.GL gl)
protected void polygonOffsetFillDisable(javax.media.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.INVALID
getBarycentre in class AbstractDrawableCoord3d.INVALID.public Point get(int p)
public List<Point> getPoints()
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)
IMultiColorable
setColorMapper in interface IMultiColorablepublic ColorMapper getColorMapper()
IMultiColorable
getColorMapper in interface IMultiColorablepublic void setColor(Color color)
ISingleColorable
setColor in interface ISingleColorablecolor - the colorpublic Color getColor()
ISingleColorable
getColor in interface ISingleColorablepublic String toString(int depth)
toString in class AbstractDrawable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||