Package org.jzy3d.plot3d.primitives.axis
Class AxisTickProcessor
java.lang.Object
org.jzy3d.plot3d.primitives.axis.AxisTickProcessor
A helper class to process and draw axis ticks. Processing requires calling there the
AxisLabelProcessor
methods.- Author:
- Martin Pernollet
-
Field Summary
Modifier and TypeFieldDescriptionprotected AxisBox
protected AxisLabelProcessor
protected AxisLayout
protected View2DProcessing
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalign
(Horizontal alignDefault, int dimension, Camera cam, Coord3d tickPosition) Compute horizontal alignement of a tick label based on tick position relative to camera, if the input default is nullCompute the vertical alignment of a tick label based on direction in Z space.void
drawAxisTickNumericLabel
(IPainter painter, int direction, Color color, Horizontal hAlign, Vertical vAlign, BoundingBox3d ticksTxtBounds, String tickLabel, Coord3d tickPosition) drawAxisTicks
(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, double xpos, double ypos, double zpos, float xdir, float ydir, float zdir, double[] ticks) Draw an array of ticks on the given axis indicated by direction field.drawAxisTicks
(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, Coord3d pos, Coord3d dir, double[] ticks) void
drawTickLine
(IPainter painter, Color color, Coord3d pos, Coord3d lab) Actually draws the line.drawTicks
(IPainter painter, int axis, int dimension, Color color, Horizontal hal, Vertical val) Draws axis labels, tick lines and tick labelgetAxis()
protected float
getTickLength3D_OrComputeTickLength2D
(IPainter painter, int dimension) Compute tick length, returned as a ratio of the scene bounds.void
protected Coord3d
tickDirection
(int quad_0, int quad_1) protected Coord3d
tickPosition
(int quad_0, int quad_1)
-
Field Details
-
axis
-
layout
-
labels
-
view2D
-
-
Constructor Details
-
AxisTickProcessor
public AxisTickProcessor() -
AxisTickProcessor
-
-
Method Details
-
drawTicks
-
drawTicks
public BoundingBox3d drawTicks(IPainter painter, int axis, int dimension, Color color, Horizontal hal, Vertical val) Draws axis labels, tick lines and tick label -
getTickLength3D_OrComputeTickLength2D
Compute tick length, returned as a ratio of the scene bounds. -
drawAxisTicks
public AxisRenderingInfo drawAxisTicks(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, Coord3d pos, Coord3d dir, double[] ticks) -
drawAxisTicks
public AxisRenderingInfo drawAxisTicks(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, double xpos, double ypos, double zpos, float xdir, float ydir, float zdir, double[] ticks) Draw an array of ticks on the given axis indicated by direction field. Return the segment of the axis. -
drawAxisTickNumericLabel
public void drawAxisTickNumericLabel(IPainter painter, int direction, Color color, Horizontal hAlign, Vertical vAlign, BoundingBox3d ticksTxtBounds, String tickLabel, Coord3d tickPosition) -
align
Compute the vertical alignment of a tick label based on direction in Z space. -
align
Compute horizontal alignement of a tick label based on tick position relative to camera, if the input default is null -
drawTickLine
Actually draws the line. -
tickPosition
-
tickDirection
-
setAxis
-
getAxis
-