Class Quality
java.lang.Object
org.jzy3d.plot3d.rendering.canvas.Quality
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 the
View
makes its
GL2 initialization. The Quality
may also activate an AbstractOrderingStrategy
algorithm 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
IAnimator
updating the choosen ICanvas
implementation.
setAutoSwapBuffer(false) will configure the ICanvas
.- Author:
- Martin Pernollet
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Quality
protected boolean
static boolean
protected boolean
protected boolean
protected static final Quality
protected static final Quality
protected boolean
protected boolean
protected static final Quality
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
-
Constructor Summary
ConstructorDescriptionQuality
(boolean depthActivated, boolean alphaActivated, boolean smoothColor, boolean smoothPoint, boolean smoothLine, boolean smoothPolygon, boolean disableDepthTestWhenAlphaActivated) Initialize a Quality configuration for a View. -
Method Summary
Modifier and TypeMethodDescriptionstatic final Quality
Advanced()
Enables alpha and color interpolation.clone()
static final Quality
Fastest()
Minimal quality to allow fastest rendering (no alpha, interpolation or antialiasing).getHiDPI()
static final Quality
Enables color interpolation.boolean
boolean
boolean
boolean
boolean
boolean
boolean
Used by aCanvas
to setup pixel ratio.boolean
boolean
boolean
boolean
static final Quality
Nicest()
Enables alpha, color interpolation and antialiasing on lines, points, and polygons.setAlphaActivated
(boolean alphaActivated) setAnimated
(boolean isAnimated) setAutoSwapBuffer
(boolean isAutoSwapBuffer) void
setColorModel
(ColorModel model) setDepthActivated
(boolean depthActivated) setDisableDepthBufferWhenAlpha
(boolean disableDepthBufferWhenAlpha) 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.setPreserveViewportSize
(boolean preserveViewportSize) setSmoothColor
(boolean smoothColor) setSmoothEdge
(boolean smoothLine) Deprecated.setSmoothLine
(boolean smoothLine) setSmoothPoint
(boolean smoothPoint) setSmoothPolygon
(boolean smoothPolygon)
-
Field Details
-
Nicest
-
Advanced
-
Intermediate
-
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
-
-
Constructor Details
-
Quality
public Quality(boolean depthActivated, boolean alphaActivated, boolean smoothColor, boolean smoothPoint, boolean smoothLine, boolean smoothPolygon, boolean disableDepthTestWhenAlphaActivated) Initialize a Quality configuration for a View.
-
-
Method Details
-
Nicest
Enables alpha, color interpolation and antialiasing on lines, points, and polygons. -
Advanced
Enables alpha and color interpolation. Set HiDPI on by default -
Intermediate
Enables color interpolation. Keep HiDPI off by default -
Fastest
Minimal quality to allow fastest rendering (no alpha, interpolation or antialiasing). -
isDepthActivated
public boolean isDepthActivated() -
setDepthActivated
-
isAlphaActivated
public boolean isAlphaActivated() -
setAlphaActivated
-
isSmoothColor
public boolean isSmoothColor() -
setSmoothColor
-
isSmoothLine
public boolean isSmoothLine() -
setSmoothLine
-
setSmoothEdge
Deprecated.Use setSmoothLine instead -
isSmoothPoint
public boolean isSmoothPoint() -
setSmoothPoint
-
isSmoothPolygon
public boolean isSmoothPolygon() -
setSmoothPolygon
-
isDisableDepthBufferWhenAlpha
public boolean isDisableDepthBufferWhenAlpha() -
setDisableDepthBufferWhenAlpha
-
isAnimated
public boolean isAnimated() -
setAnimated
-
isAutoSwapBuffer
public boolean isAutoSwapBuffer() -
setAutoSwapBuffer
-
isPreserveViewportSize
public boolean isPreserveViewportSize()Used by aCanvas
to 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 }); invalid input: '<'/
-
setPreserveViewportSize
-
isHiDPIEnabled
public boolean isHiDPIEnabled() -
getHiDPI
-
setHiDPIEnabled
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
-
-
setHiDPI
-
getColorModel
-
setColorModel
-
clone
-