Class AxisTickProcessor


  • public class AxisTickProcessor
    extends Object
    A helper class to process and draw axis ticks. Processing requires calling there the AxisLabelProcessor methods.
    Author:
    Martin Pernollet
    • Constructor Detail

      • AxisTickProcessor

        public AxisTickProcessor​(AxisBox axis)
    • Method Detail

      • 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,
                                               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.
      • 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
      • tickPosition

        protected Coord3d tickPosition​(int quad_0,
                                       int quad_1)
      • tickDirection

        protected Coord3d tickDirection​(int quad_0,
                                        int quad_1)