Class Quality
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.canvas.Quality
-
public class Quality extends Object
Provides a structure for setting the rendering quality, i.e., the tradeoff between computation speed, and graphic quality. Following mode have an impact on the way theViewmakes its GL2 initialization. TheQualitymay also activate anAbstractOrderingStrategyalgorithm that enables clean alpha results.- Fastest: No transparency, no color shading, just handle depth buffer.
- Intermediate: include Fastest mode abilities, Color shading, mainly usefull to have interpolated colors on polygons.
- Advanced: include Intermediate mode abilities, Transparency (GL2 alpha blending + polygon ordering in scene graph)
- Nicest: include Advanced mode abilities, Anti aliasing on wires
IAnimatorupdating the choosenICanvasimplementation. setAutoSwapBuffer(false) will configure theICanvas.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected static QualityAdvancedprotected booleanalphaActivatedstatic booleanDEFAULT_PRESERVE_VIEWPORTprotected booleandepthActivatedprotected booleandisableDepthTestWhenAlphaprotected static QualityFastestprotected static QualityIntermediateprotected booleanisAnimatedprotected booleanisAutoSwapBufferprotected static QualityNicestprotected booleanpreserveViewportSizeprotected booleansmoothColorprotected booleansmoothLineprotected booleansmoothPointprotected booleansmoothPolygon
-
Constructor Summary
Constructors Constructor Description Quality(boolean depthActivated, boolean alphaActivated, boolean smoothColor, boolean smoothPoint, boolean smoothLine, boolean smoothPolygon, boolean disableDepthTestWhenAlphaActivated)Initialize a Quality configuration for a View.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static QualityAdvanced()Enables alpha and color interpolation.Qualityclone()static QualityFastest()Minimal quality to allow fastest rendering (no alpha, interpolation or antialiasing).ColorModelgetColorModel()HiDPIgetHiDPI()static QualityIntermediate()Enables color interpolation.booleanisAlphaActivated()booleanisAnimated()booleanisAutoSwapBuffer()booleanisDepthActivated()booleanisDisableDepthBufferWhenAlpha()booleanisHiDPIEnabled()booleanisPreserveViewportSize()Used by aCanvasto setup pixel ratio.booleanisSmoothColor()booleanisSmoothLine()booleanisSmoothPoint()booleanisSmoothPolygon()static QualityNicest()Enables alpha, color interpolation and antialiasing on lines, points, and polygons.QualitysetAlphaActivated(boolean alphaActivated)QualitysetAnimated(boolean isAnimated)QualitysetAutoSwapBuffer(boolean isAutoSwapBuffer)voidsetColorModel(ColorModel model)QualitysetDepthActivated(boolean depthActivated)QualitysetDisableDepthBufferWhenAlpha(boolean disableDepthBufferWhenAlpha)QualitysetHiDPI(HiDPI hidpi)QualitysetHiDPIEnabled(boolean hidpi)If true, states that the chart should make use of HiDPI or Retina capabilities to draw more good looking charts due to higher number of physical pixels.QualitysetPreserveViewportSize(boolean preserveViewportSize)QualitysetSmoothColor(boolean smoothColor)QualitysetSmoothEdge(boolean smoothLine)QualitysetSmoothPoint(boolean smoothPoint)QualitysetSmoothPolygon(boolean smoothPolygon)
-
-
-
Field Detail
-
Nicest
protected static final Quality Nicest
-
Advanced
protected static final Quality Advanced
-
Intermediate
protected static final Quality Intermediate
-
Fastest
protected static final Quality Fastest
-
depthActivated
protected boolean depthActivated
-
alphaActivated
protected boolean alphaActivated
-
smoothColor
protected boolean smoothColor
-
smoothPoint
protected boolean smoothPoint
-
smoothLine
protected boolean smoothLine
-
smoothPolygon
protected boolean smoothPolygon
-
disableDepthTestWhenAlpha
protected boolean disableDepthTestWhenAlpha
-
isAnimated
protected boolean isAnimated
-
isAutoSwapBuffer
protected boolean isAutoSwapBuffer
-
preserveViewportSize
protected boolean preserveViewportSize
-
DEFAULT_PRESERVE_VIEWPORT
public static boolean DEFAULT_PRESERVE_VIEWPORT
-
-
Method Detail
-
Nicest
public static final Quality Nicest()
Enables alpha, color interpolation and antialiasing on lines, points, and polygons.
-
Advanced
public static final Quality Advanced()
Enables alpha and color interpolation. Set HiDPI on by default
-
Intermediate
public static final Quality Intermediate()
Enables color interpolation. Keep HiDPI off by default
-
Fastest
public static final Quality Fastest()
Minimal quality to allow fastest rendering (no alpha, interpolation or antialiasing).
-
isDepthActivated
public boolean isDepthActivated()
-
setDepthActivated
public Quality setDepthActivated(boolean depthActivated)
-
isAlphaActivated
public boolean isAlphaActivated()
-
setAlphaActivated
public Quality setAlphaActivated(boolean alphaActivated)
-
isSmoothColor
public boolean isSmoothColor()
-
setSmoothColor
public Quality setSmoothColor(boolean smoothColor)
-
isSmoothLine
public boolean isSmoothLine()
-
setSmoothEdge
public Quality setSmoothEdge(boolean smoothLine)
-
isSmoothPoint
public boolean isSmoothPoint()
-
setSmoothPoint
public Quality setSmoothPoint(boolean smoothPoint)
-
isSmoothPolygon
public boolean isSmoothPolygon()
-
setSmoothPolygon
public Quality setSmoothPolygon(boolean smoothPolygon)
-
isDisableDepthBufferWhenAlpha
public boolean isDisableDepthBufferWhenAlpha()
-
setDisableDepthBufferWhenAlpha
public Quality setDisableDepthBufferWhenAlpha(boolean disableDepthBufferWhenAlpha)
-
isAnimated
public boolean isAnimated()
-
setAnimated
public Quality setAnimated(boolean isAnimated)
-
isAutoSwapBuffer
public boolean isAutoSwapBuffer()
-
setAutoSwapBuffer
public Quality setAutoSwapBuffer(boolean isAutoSwapBuffer)
-
isPreserveViewportSize
public boolean isPreserveViewportSize()
Used by aCanvasto setup pixel ratio. This might be used to avoid mouse pointer errors on Retina display as most canvas implementation will perform :if(quality.isPreserveViewportSize()) setPixelScale(new float[] { ScalableSurface.IDENTITY_PIXELSCALE, ScalableSurface.IDENTITY_PIXELSCALE });
-
setPreserveViewportSize
public Quality setPreserveViewportSize(boolean preserveViewportSize)
-
isHiDPIEnabled
public boolean isHiDPIEnabled()
-
getHiDPI
public HiDPI getHiDPI()
-
setHiDPIEnabled
public Quality setHiDPIEnabled(boolean hidpi)
If true, states that the chart should make use of HiDPI or Retina capabilities to draw more good looking charts due to higher number of physical pixels. A convenient shortcut tosetPreserveViewportSize(!hidpi)- Parameters:
hidpi-
-
getColorModel
public ColorModel getColorModel()
-
setColorModel
public void setColorModel(ColorModel model)
-
-