Package org.jzy3d.plot3d.primitives
Class CoplanarityManager
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.CoplanarityManager
-
- All Implemented Interfaces:
IGLBindedResource
,IGLRenderer
,ISortableDraw
public class CoplanarityManager extends Drawable implements IGLBindedResource
This pseudo-drawable will handle drawing outlines (such as polygon border), contour line (lying exactly ON a polygon), or text which position is ON a polygon) that may be coplanar or partially hidden by a collection of polygons. This allows rendering outlines properly and hence deals with Z-fighting artifacts, 2d text crossing 3D contents, etc.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected List<? extends Drawable>
outlines
protected Drawable
plane
-
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 CoplanarityManager(List<? extends Drawable> outlines, Drawable plane)
CoplanarityManager(Drawable outline, Drawable plane)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGeometryTransform(Transform transform)
protected void
computeBounds(List<? extends Drawable> outlines, Drawable plane)
Will try to compute bounds if they are available.void
draw(IPainter painter)
Implements recipe given byboolean
hasMountedOnce()
Return true if mount(...) has been called at least one timevoid
mount(IPainter painter)
Mount resources to gl contextprotected void
mount(IPainter painter, Drawable d)
void
updateBounds()
-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doDrawBoundsIfDisplayed, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, toString
-
-
-
-
Method Detail
-
computeBounds
protected void computeBounds(List<? extends Drawable> outlines, Drawable plane)
Will try to compute bounds if they are available. This should be invoked- While building the object
- While mounting the object, has it may contain resource that have their bounds known after mounting.
- Parameters:
outlines
-plane
-
-
draw
public void draw(IPainter painter)
Implements recipe given by- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in classDrawable
-
mount
public void mount(IPainter painter)
Description copied from interface:IGLBindedResource
Mount resources to gl context- Specified by:
mount
in interfaceIGLBindedResource
-
hasMountedOnce
public boolean hasMountedOnce()
Description copied from interface:IGLBindedResource
Return true if mount(...) has been called at least one time- Specified by:
hasMountedOnce
in interfaceIGLBindedResource
-
-