Package org.jzy3d.plot3d.primitives.axis
Class FeedbackBufferAxisBox
java.lang.Object
org.jzy3d.plot3d.primitives.axis.AxisBox
org.jzy3d.plot3d.primitives.axis.FeedbackBufferAxisBox
- All Implemented Interfaces:
IAxis
This
AxisBox
implementation was the first to appear in Jzy3d. It computes hidden faces
via method getHiddenQuads(org.jzy3d.painters.IPainter)
using the OpenGL feedback buffer, which seems to fail on some
laptop GPU. (especially Lenovo notepads).- Author:
- Martin Pernollet
-
Field Summary
Fields inherited from class org.jzy3d.plot3d.primitives.axis.AxisBox
annotations, AXE_X, AXE_Y, AXE_Z, axeXquads, axeXx, axeXy, axeXz, axeYquads, axeYx, axeYy, axeYz, axeZquads, axeZx, axeZy, axeZz, boxBounds, center, depthRangeTrick, EDGE_0, EDGE_1, EDGE_2, EDGE_3, labels, layout, NO_OVERLAP_DEPTH_RATIO, normx, normy, normz, PRECISION, quadIsHidden, quadx, quady, quadz, rotateLabel, scale, spaceTransformer, textRenderer, ticks, view, wholeBounds, xrange, yrange, zrange
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawCube
(IPainter painter, RenderMode mode) Make all GL2 calls allowing to build a cube with 6 separate quads.protected boolean[]
getEmptyTokens
(int ntokens, float[] buffer, int size) This utility function inform wether a GL_PASS_THROUGH_TOKEN was followed by other OpenGL tokens (GL_POLYGON_TOKEN, GL_LINE_TOKEN, etc), or not.protected boolean[]
getHiddenQuads
(IPainter painter) Render the cube into the feedback buffer, in order to parse feedback and determine which quad where displayed or not.protected int
print3DcolorVertex
(int size, int count, float[] buffer) Print out parameters of a gl call in 3dColor mode.Methods inherited from class org.jzy3d.plot3d.primitives.axis.AxisBox
addAnnotation, dispose, doTransform, draw, drawAnnotations, drawFace, drawGrid, drawGridOnQuad, drawTicksAndLabels, drawTicksAndLabelsX, drawTicksAndLabelsY, drawTicksAndLabelsZ, findClosestXaxe, findClosestYaxe, findClosestZaxe, getAnnotations, getAxisTicks, getBounds, getCenter, getCorners, getHiddenQuads, getLabelProcessor, getLabelRotator, getLayout, getQuadIsHidden, getQuadX, getQuadY, getQuadZ, getScale, getSpaceTransformer, getTextRenderer, getTickProcessor, getView, getWholeBounds, init, is2DWithX, is2DWithY, is2DWithZ, is3D, isX, isXAxisLabelDisplayed, isY, isYAxisLabelDisplayed, isZ, isZAxisLabelDisplayed, min, setAnnotations, setAxe, setAxeBox, setLabelProcessor, setLabelRotator, setScale, setSpaceTransformer, setTextRenderer, setTickProcessor, setView, updateHiddenQuads
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jzy3d.plot3d.primitives.axis.IAxis
dispose, draw, getAnnotations, getBounds, getCenter, getLayout, getScale, getSpaceTransformer, getTextRenderer, getWholeBounds, setAnnotations, setAxe, setScale, setSpaceTransformer, setTextRenderer
-
Constructor Details
-
FeedbackBufferAxisBox
-
FeedbackBufferAxisBox
-
-
Method Details
-
drawCube
Make all GL2 calls allowing to build a cube with 6 separate quads. Each quad is indexed from 0.0f to 5.0f using glPassThrough, and may be traced in feedback mode when mode=GL2.GL_FEEDBACK -
getHiddenQuads
Render the cube into the feedback buffer, in order to parse feedback and determine which quad where displayed or not.- Overrides:
getHiddenQuads
in classAxisBox
-
getEmptyTokens
protected boolean[] getEmptyTokens(int ntokens, float[] buffer, int size) This utility function inform wether a GL_PASS_THROUGH_TOKEN was followed by other OpenGL tokens (GL_POLYGON_TOKEN, GL_LINE_TOKEN, etc), or not. In the first case, the given token is considered as non empty, in the other case, it is considered as empty. The expected use of this function is to inform the user wether a polygon has been displayed or not in the case Culling was activated. Note: this function is only intended to work in the case where gl.glFeedbackBuffer is called with GL.GL_3D_COLOR as second argument, i.e. vertices are made of x, y, z, alpha values and a color. Thus, no texture may be used, and trying to parse a GL_BITMAP_TOKEN, GL_DRAW_PIXEL_TOKEN, or GL_COPY_PIXEL_TOKEN will throw a RuntimeException. Note: this function only works with PASS_THROUGH_TOKEN with a positive integer value, since this value will be used as an index in the boolean array returned by the function TODO: use a map to associate a float token to a polygon with an id?- Throws:
a
- RuntimeException if a parsed token is either GL_BITMAP_TOKEN, GL_DRAW_PIXEL_TOKEN, or GL_COPY_PIXEL_TOKEN.
-
print3DcolorVertex
protected int print3DcolorVertex(int size, int count, float[] buffer) Print out parameters of a gl call in 3dColor mode.
-