Package org.jzy3d.plot3d.primitives
Class Wireframeable
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Wireframeable
-
- All Implemented Interfaces:
IGLRenderer
,ISortableDraw
- Direct Known Subclasses:
AbstractEnlightable
,CompileableComposite
,Composite
,CubeGLUT
,Disk
,Geometry
,LineStrip
,Parallelepiped
,Sphere
,Tube
public abstract class Wireframeable extends Drawable
AnWireframeable
is aDrawable
that has a wireframe mode for display. Defining an object asWireframeable
means this object may have a wireframe mode status (on/off), a wireframe color, and a wireframe width. As a consequence of beingWireframeable
, a 3d object may have his faces displayed or not bysetFaceDisplayed(boolean)
.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
faceDisplayed
protected float
polygonOffsetFactor
protected boolean
polygonOffsetFillEnable
protected float
polygonOffsetUnit
protected boolean
polygonWireframeDepthTrick
protected Color
wireframeColor
protected boolean
wireframeColorFromPolygonPoints
protected boolean
wireframeDisplayed
protected float
wireframeWidth
-
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
-
Constructor Summary
Constructors Constructor Description Wireframeable()
Initialize the wireframeable with a white color and width of 1 for wires, hidden wireframe, and displayed faces.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyDepthRangeForOverlying(IPainter painter)
protected void
applyDepthRangeForUnderlying(IPainter painter)
boolean
getFaceDisplayed()
Get the face display status to on or off.float
getPolygonOffsetFactor()
float
getPolygonOffsetUnit()
Color
getWireframeColor()
Get the wireframe color.boolean
getWireframeDisplayed()
Get the wireframe display status to on or off.float
getWireframeWidth()
Get the wireframe width.boolean
isPolygonOffsetFillEnable()
boolean
isPolygonWireframeDepthTrick()
boolean
isWireframeColorFromPolygonPoints()
protected void
polygonOffseFillEnable(IPainter painter)
protected void
polygonOffsetFillDisable(IPainter painter)
protected void
polygonOffsetLineDisable(IPainter painter)
protected void
polygonOffsetLineEnable(IPainter painter)
void
setFaceDisplayed(boolean status)
Set the face display status to on or off.void
setPolygonOffsetFactor(float polygonOffsetFactor)
void
setPolygonOffsetFillEnable(boolean polygonOffsetFillEnable)
Enable offset fill, which let a polygon with a wireframe render cleanly without weird depth uncertainty between face polygon and wireframe polygon.void
setPolygonOffsetUnit(float polygonOffsetUnit)
void
setPolygonWireframeDepthTrick(boolean polygonWireframeDepthTrick)
May be used as alternative tosetPolygonOffsetFillEnable(boolean)
in case it is not supported by underlying OpenGL version (Polygon offset appears as off version 2).void
setWireframeColor(Color color)
Set the wireframe color.void
setWireframeColorFromPolygonPoints(boolean wireframeColorFromPolygonPoints)
void
setWireframeDisplayed(boolean status)
Set the wireframe display status to on or off.void
setWireframeWidth(float width)
Set the wireframe width.-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, applyGeometryTransform, dispose, doDrawBoundsIfDisplayed, doTransform, draw, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, negative, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, toString, updateBounds
-
-
-
-
Field Detail
-
wireframeColor
protected Color wireframeColor
-
wireframeWidth
protected float wireframeWidth
-
wireframeDisplayed
protected boolean wireframeDisplayed
-
wireframeColorFromPolygonPoints
protected boolean wireframeColorFromPolygonPoints
-
faceDisplayed
protected boolean faceDisplayed
-
polygonWireframeDepthTrick
protected boolean polygonWireframeDepthTrick
-
polygonOffsetFillEnable
protected boolean polygonOffsetFillEnable
-
polygonOffsetFactor
protected float polygonOffsetFactor
-
polygonOffsetUnit
protected float polygonOffsetUnit
-
-
Method Detail
-
isWireframeColorFromPolygonPoints
public boolean isWireframeColorFromPolygonPoints()
-
setWireframeColorFromPolygonPoints
public void setWireframeColorFromPolygonPoints(boolean wireframeColorFromPolygonPoints)
-
setWireframeColor
public void setWireframeColor(Color color)
Set the wireframe color.
-
setWireframeDisplayed
public void setWireframeDisplayed(boolean status)
Set the wireframe display status to on or off.
-
setWireframeWidth
public void setWireframeWidth(float width)
Set the wireframe width.
-
setFaceDisplayed
public void setFaceDisplayed(boolean status)
Set the face display status to on or off.
-
getWireframeColor
public Color getWireframeColor()
Get the wireframe color.
-
getWireframeDisplayed
public boolean getWireframeDisplayed()
Get the wireframe display status to on or off.
-
getWireframeWidth
public float getWireframeWidth()
Get the wireframe width.
-
getFaceDisplayed
public boolean getFaceDisplayed()
Get the face display status to on or off.
-
polygonOffseFillEnable
protected void polygonOffseFillEnable(IPainter painter)
-
polygonOffsetFillDisable
protected void polygonOffsetFillDisable(IPainter painter)
-
polygonOffsetLineEnable
protected void polygonOffsetLineEnable(IPainter painter)
-
polygonOffsetLineDisable
protected void polygonOffsetLineDisable(IPainter painter)
-
isPolygonOffsetFillEnable
public boolean isPolygonOffsetFillEnable()
-
setPolygonOffsetFillEnable
public void setPolygonOffsetFillEnable(boolean polygonOffsetFillEnable)
Enable offset fill, which let a polygon with a wireframe render cleanly without weird depth uncertainty between face polygon and wireframe polygon.
-
getPolygonOffsetFactor
public float getPolygonOffsetFactor()
-
setPolygonOffsetFactor
public void setPolygonOffsetFactor(float polygonOffsetFactor)
-
getPolygonOffsetUnit
public float getPolygonOffsetUnit()
-
setPolygonOffsetUnit
public void setPolygonOffsetUnit(float polygonOffsetUnit)
-
setPolygonWireframeDepthTrick
public void setPolygonWireframeDepthTrick(boolean polygonWireframeDepthTrick)
May be used as alternative tosetPolygonOffsetFillEnable(boolean)
in case it is not supported by underlying OpenGL version (Polygon offset appears as off version 2).
-
isPolygonWireframeDepthTrick
public boolean isPolygonWireframeDepthTrick()
-
applyDepthRangeForUnderlying
protected void applyDepthRangeForUnderlying(IPainter painter)
-
applyDepthRangeForOverlying
protected void applyDepthRangeForOverlying(IPainter painter)
-
-