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 int
static final int
static final int
protected int[][]
protected float[][]
protected float[][]
protected float[][]
protected int[][]
protected float[][]
protected float[][]
protected float[][]
protected int[][]
protected float[][]
protected float[][]
protected float[][]
protected BoundingBox3d
protected Coord3d
protected boolean
static final int
static final int
static final int
static final int
protected AxisLabelProcessor
protected AxisLayout
static float
The 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 int
protected boolean[]
protected float[][]
protected float[][]
protected float[][]
protected AxisLabelRotator
protected Coord3d
protected SpaceTransformer
protected ITextRenderer
protected AxisTickProcessor
protected View
protected BoundingBox3d
protected float
protected float
protected float
-
Constructor Summary
ConstructorsConstructorDescriptionAxisBox()
AxisBox
(BoundingBox3d bbox) AxisBox
(BoundingBox3d bbox, AxisLayout layout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAnnotation
(AxeAnnotation annotation) void
dispose()
void
doTransform
(IPainter painter) reset to identity and apply scalingvoid
Draws the AxisBox.protected void
drawAnnotations
(IPainter painter) protected void
drawCube
(IPainter painter, RenderMode mode) void
void
protected void
drawGridOnQuad
(IPainter painter, int quad) void
drawTicksAndLabels
(IPainter painter) Trigger all axis ticks and labels rendering if conditions are met.void
drawTicksAndLabelsX
(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)void
drawTicksAndLabelsY
(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)void
drawTicksAndLabelsZ
(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 int
findClosestXaxe
(Camera cam) Selects the closest displayable X axe from cameraprotected int
findClosestYaxe
(Camera cam) Selects the closest displayable Y axe from cameraprotected int
findClosestZaxe
(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 void
init()
protected boolean
returns true if view is configured for a 2D chart where X is a visible axis.protected boolean
returns true if view is configured for a 2D chart where Y is a visible axis.protected boolean
returns true if view is configured for a 2D chart where Z is a visible axis.protected boolean
is3D()
returns true if view is configured for a 3D chart where all axes are visible.protected boolean
isX
(int direction) protected boolean
isXAxisLabelDisplayed
(int direction) protected boolean
isY
(int direction) protected boolean
isYAxisLabelDisplayed
(int direction) protected boolean
isZ
(int direction) protected boolean
isZAxisLabelDisplayed
(int direction) protected int
min
(double[] values) Return the index of the minimum value contained in the input array of doubles.void
setAnnotations
(List<AxeAnnotation> annotations) void
setAxe
(BoundingBox3d bbox) protected void
setAxeBox
(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) Set the parameters and data of the AxeBox.void
setLabelProcessor
(AxisLabelProcessor labels) void
setLabelRotator
(AxisLabelRotator rotateLabel) void
Set the scaling factor that are applyed on this object before GL2 commands.void
setSpaceTransformer
(SpaceTransformer spaceTransformer) void
setTextRenderer
(ITextRenderer renderer) void
void
When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.protected void
updateHiddenQuads
(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:
getTextRenderer
in interfaceIAxis
-
setTextRenderer
- Specified by:
setTextRenderer
in interfaceIAxis
-
getView
-
getBounds
-
getLayout
-
getSpaceTransformer
- Specified by:
getSpaceTransformer
in interfaceIAxis
-
setSpaceTransformer
- Specified by:
setSpaceTransformer
in 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 callinginvalid @link
draw()
- Specified by:
getWholeBounds
in interfaceIAxis
-
getCenter
-
setScale
Set the scaling factor that are applyed on this object before GL2 commands. -
getScale
-
getAnnotations
- Specified by:
getAnnotations
in interfaceIAxis
-
setAnnotations
- Specified by:
setAnnotations
in 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
-