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>outlinesprotected Drawableplane-
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 voidapplyGeometryTransform(Transform transform)protected voidcomputeBounds(List<? extends Drawable> outlines, Drawable plane)Will try to compute bounds if they are available.voiddraw(IPainter painter)Implements recipe given bybooleanhasMountedOnce()Return true if mount(...) has been called at least one timevoidmount(IPainter painter)Mount resources to gl contextprotected voidmount(IPainter painter, Drawable d)voidupdateBounds()-
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:
drawin interfaceIGLRenderer- Specified by:
drawin classDrawable
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransformin classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBoundsin classDrawable
-
mount
public void mount(IPainter painter)
Description copied from interface:IGLBindedResourceMount resources to gl context- Specified by:
mountin interfaceIGLBindedResource
-
hasMountedOnce
public boolean hasMountedOnce()
Description copied from interface:IGLBindedResourceReturn true if mount(...) has been called at least one time- Specified by:
hasMountedOncein interfaceIGLBindedResource
-
-