Package org.jzy3d.plot3d.primitives.axis
Class AxisBox
java.lang.Object
org.jzy3d.plot3d.primitives.axis.AxisBox
- All Implemented Interfaces:
IAxis
- Direct Known Subclasses:
AxisBox2d,ContourAxisBox,FeedbackBufferAxisBox
The
AxisBox displays a box with front face invisible and ticks labels.- Author:
- Martin Pernollet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<AxeAnnotation>static final intstatic final intstatic final intprotected int[][]protected float[][]protected float[][]protected float[][]protected int[][]protected float[][]protected float[][]protected float[][]protected int[][]protected float[][]protected float[][]protected float[][]protected BoundingBox3dprotected Coord3dprotected booleanstatic final intstatic final intstatic final intstatic final intprotected AxisLabelProcessorprotected AxisLayoutstatic floatThe higher the value, the more the line are far from the faces and hence no z-fighting occurs between faces and lines.protected float[]protected float[]protected float[]protected static final intprotected boolean[]protected float[][]protected float[][]protected float[][]protected AxisLabelRotatorprotected Coord3dprotected SpaceTransformerprotected ITextRendererprotected AxisTickProcessorprotected Viewprotected BoundingBox3dprotected floatprotected floatprotected float -
Constructor Summary
ConstructorsConstructorDescriptionAxisBox()AxisBox(BoundingBox3d bbox) AxisBox(BoundingBox3d bbox, AxisLayout layout) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(AxeAnnotation annotation) voiddispose()voiddoTransform(IPainter painter) reset to identity and apply scalingvoidDraws the AxisBox.protected voiddrawAnnotations(IPainter painter) protected voiddrawCube(IPainter painter, RenderMode mode) voidvoidprotected voiddrawGridOnQuad(IPainter painter, int quad) voiddrawTicksAndLabels(IPainter painter) Trigger all axis ticks and labels rendering if conditions are met.voiddrawTicksAndLabelsX(IPainter painter) Select an X axis for ticks and labels rendering if conditions are met (range > 0 and axis layout configured to display this axis)voiddrawTicksAndLabelsY(IPainter painter) Select an Y axis for ticks and labels rendering if conditions are met (range > 0 and axis layout configured to display this axis)voiddrawTicksAndLabelsZ(IPainter painter) Select a Z axis for ticks and labels rendering if conditions are met (range > 0 and axis layout configured to display this axis)protected intfindClosestXaxe(Camera cam) Selects the closest displayable X axe from cameraprotected intfindClosestYaxe(Camera cam) Selects the closest displayable Y axe from cameraprotected intfindClosestZaxe(Camera cam) Selects the closest displayable Z axe from cameraprotected double[]getAxisTicks(int direction) boolean[]getHiddenQuads(Coord3d scaledEye, Coord3d center) protected boolean[]getHiddenQuads(IPainter painter) Computes the visibility of each cube face.boolean[]float[][]getQuadX()float[][]getQuadY()float[][]getQuadZ()getScale()getView()Return the boundingBox of this axis, including the volume occupied by the texts.protected voidinit()protected booleanreturns true if view is configured for a 2D chart where X is a visible axis.protected booleanreturns true if view is configured for a 2D chart where Y is a visible axis.protected booleanreturns true if view is configured for a 2D chart where Z is a visible axis.protected booleanis3D()returns true if view is configured for a 3D chart where all axes are visible.protected booleanisX(int direction) protected booleanisXAxisLabelDisplayed(int direction) protected booleanisY(int direction) protected booleanisYAxisLabelDisplayed(int direction) protected booleanisZ(int direction) protected booleanisZAxisLabelDisplayed(int direction) protected intmin(double[] values) Return the index of the minimum value contained in the input array of doubles.voidsetAnnotations(List<AxeAnnotation> annotations) voidsetAxe(BoundingBox3d bbox) protected voidsetAxeBox(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) Set the parameters and data of the AxeBox.voidsetLabelProcessor(AxisLabelProcessor labels) voidsetLabelRotator(AxisLabelRotator rotateLabel) voidSet the scaling factor that are applyed on this object before GL2 commands.voidsetSpaceTransformer(SpaceTransformer spaceTransformer) voidsetTextRenderer(ITextRenderer renderer) voidvoidWhen setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.protected voidupdateHiddenQuads(IPainter painter)
-
Field Details
-
PRECISION
protected static final int PRECISION- See Also:
-
view
-
textRenderer
-
rotateLabel
-
labels
-
ticks
-
layout
-
boxBounds
-
wholeBounds
-
center
-
scale
-
xrange
protected float xrange -
yrange
protected float yrange -
zrange
protected float zrange -
quadx
protected float[][] quadx -
quady
protected float[][] quady -
quadz
protected float[][] quadz -
normx
protected float[] normx -
normy
protected float[] normy -
normz
protected float[] normz -
axeXx
protected float[][] axeXx -
axeXy
protected float[][] axeXy -
axeXz
protected float[][] axeXz -
axeYx
protected float[][] axeYx -
axeYy
protected float[][] axeYy -
axeYz
protected float[][] axeYz -
axeZx
protected float[][] axeZx -
axeZy
protected float[][] axeZy -
axeZz
protected float[][] axeZz -
axeXquads
protected int[][] axeXquads -
axeYquads
protected int[][] axeYquads -
axeZquads
protected int[][] axeZquads -
quadIsHidden
protected boolean[] quadIsHidden -
AXE_X
public static final int AXE_X- See Also:
-
AXE_Y
public static final int AXE_Y- See Also:
-
AXE_Z
public static final int AXE_Z- See Also:
-
EDGE_0
public static final int EDGE_0- See Also:
-
EDGE_1
public static final int EDGE_1- See Also:
-
EDGE_2
public static final int EDGE_2- See Also:
-
EDGE_3
public static final int EDGE_3- See Also:
-
depthRangeTrick
protected boolean depthRangeTrick -
NO_OVERLAP_DEPTH_RATIO
public static float NO_OVERLAP_DEPTH_RATIOThe higher the value, the more the line are far from the faces and hence no z-fighting occurs between faces and lines. In case of higher value, line will be display more often, but also lines that should be behind the polygon -
annotations
-
spaceTransformer
-
-
Constructor Details
-
AxisBox
public AxisBox() -
AxisBox
-
AxisBox
-
-
Method Details
-
draw
Draws the AxisBox. The camera is used to determine which axis is closest to the ur point ov view, in order to decide for an axis on which to diplay the tick values. -
drawAnnotations
-
doTransform
reset to identity and apply scaling -
drawFace
-
drawGrid
-
drawCube
-
drawGridOnQuad
-
drawTicksAndLabels
Trigger all axis ticks and labels rendering if conditions are met. -
drawTicksAndLabelsX
Select an X axis for ticks and labels rendering if conditions are met (range > 0 and axis layout configured to display this axis) -
drawTicksAndLabelsY
Select an Y axis for ticks and labels rendering if conditions are met (range > 0 and axis layout configured to display this axis) -
drawTicksAndLabelsZ
Select a Z axis for ticks and labels rendering if conditions are met (range > 0 and axis layout configured to display this axis) -
is3D
protected boolean is3D()returns true if view is configured for a 3D chart where all axes are visible. -
is2DWithX
protected boolean is2DWithX()returns true if view is configured for a 2D chart where X is a visible axis. -
is2DWithY
protected boolean is2DWithY()returns true if view is configured for a 2D chart where Y is a visible axis. -
is2DWithZ
protected boolean is2DWithZ()returns true if view is configured for a 2D chart where Z is a visible axis. -
isZAxisLabelDisplayed
protected boolean isZAxisLabelDisplayed(int direction) -
isYAxisLabelDisplayed
protected boolean isYAxisLabelDisplayed(int direction) -
isXAxisLabelDisplayed
protected boolean isXAxisLabelDisplayed(int direction) -
isZ
protected boolean isZ(int direction) -
isY
protected boolean isY(int direction) -
isX
protected boolean isX(int direction) -
getAxisTicks
protected double[] getAxisTicks(int direction) -
findClosestXaxe
Selects the closest displayable X axe from camera -
findClosestYaxe
Selects the closest displayable Y axe from camera -
findClosestZaxe
Selects the closest displayable Z axe from camera -
min
protected int min(double[] values) Return the index of the minimum value contained in the input array of doubles. If no value is smaller than Double.MAX_VALUE, the returned index is -1. -
updateHiddenQuads
-
getHiddenQuads
Computes the visibility of each cube face. -
getHiddenQuads
-
setAxeBox
protected void setAxeBox(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) Set the parameters and data of the AxeBox. -
init
protected void init() -
dispose
public void dispose() -
getTextRenderer
- Specified by:
getTextRendererin interfaceIAxis
-
setTextRenderer
- Specified by:
setTextRendererin interfaceIAxis
-
getView
-
getBounds
-
getLayout
-
getSpaceTransformer
- Specified by:
getSpaceTransformerin interfaceIAxis
-
setSpaceTransformer
- Specified by:
setSpaceTransformerin interfaceIAxis
-
setView
When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement. -
setAxe
-
getWholeBounds
Return the boundingBox of this axis, including the volume occupied by the texts. This requires callingbefore, which computes actual ticks position in 3d, and updates the bounds.invalid @link
draw()- Specified by:
getWholeBoundsin interfaceIAxis
-
getCenter
-
setScale
Set the scaling factor that are applyed on this object before GL2 commands. -
getScale
-
getAnnotations
- Specified by:
getAnnotationsin interfaceIAxis
-
setAnnotations
- Specified by:
setAnnotationsin interfaceIAxis
-
addAnnotation
-
getQuadX
public float[][] getQuadX() -
getQuadY
public float[][] getQuadY() -
getQuadZ
public float[][] getQuadZ() -
getQuadIsHidden
public boolean[] getQuadIsHidden() -
getCorners
-
getLabelRotator
-
setLabelRotator
-
getLabelProcessor
-
setLabelProcessor
-
getTickProcessor
-
setTickProcessor
-