Package org.jzy3d.plot3d.primitives.axis
Class AxisTickProcessor
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.axis.AxisTickProcessor
-
public class AxisTickProcessor extends Object
A helper class to process and draw axis ticks. Processing requires calling there theAxisLabelProcessor
methods.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected AxisBox
axis
protected AxisLabelProcessor
labels
protected AxisLayout
layout
-
Constructor Summary
Constructors Constructor Description AxisTickProcessor(AxisBox axis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Horizontal
align(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 nullVertical
align(Vertical alignDefault, int dimension, float zdir)
Compute 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)
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.AxisRenderingInfo
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.BoundingBox3d
drawTicks(IPainter painter, int axis, int dimension, Color color)
BoundingBox3d
drawTicks(IPainter painter, int axis, int dimension, Color color, Horizontal hal, Vertical val)
Draws axis labels, tick lines and tick labelprotected float
getTickLength3D_OrComputeTickLength2D(IPainter painter, int dimension)
Compute tick length, returned as a ratio of the scene bounds.protected Coord3d
tickDirection(int quad_0, int quad_1)
protected Coord3d
tickPosition(int quad_0, int quad_1)
-
-
-
Field Detail
-
axis
protected AxisBox axis
-
layout
protected AxisLayout layout
-
labels
protected AxisLabelProcessor labels
-
-
Constructor Detail
-
AxisTickProcessor
public AxisTickProcessor(AxisBox axis)
-
-
Method Detail
-
drawTicks
public BoundingBox3d drawTicks(IPainter painter, int axis, int dimension, Color color)
-
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
protected float getTickLength3D_OrComputeTickLength2D(IPainter painter, int dimension)
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
public Vertical align(Vertical alignDefault, int dimension, float zdir)
Compute the vertical alignment of a tick label based on direction in Z space.
-
align
public Horizontal align(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 null
-
drawTickLine
public void drawTickLine(IPainter painter, Color color, Coord3d pos, Coord3d lab)
Actually draws the line.
-
tickPosition
protected Coord3d tickPosition(int quad_0, int quad_1)
-
tickDirection
protected Coord3d tickDirection(int quad_0, int quad_1)
-
-