Class AxisBox

    • Field Detail

      • view

        protected View view
      • 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
    • Method Detail

      • draw

        public void draw​(IPainter painter)
        Draws the AxeBox. 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.
        Specified by:
        draw in interface IAxis
      • drawAnnotations

        protected void drawAnnotations​(IPainter painter)
      • doTransform

        public void doTransform​(IPainter painter)
        reset to identity and apply scaling
        Parameters:
        painter - TODO
      • cullingDisable

        public void cullingDisable​(IPainter painter)
      • cullingEnable

        public void cullingEnable​(IPainter painter)
      • drawFace

        public void drawFace​(IPainter painter)
      • drawGrid

        public void drawGrid​(IPainter painter)
      • drawGridOnQuad

        protected void drawGridOnQuad​(IPainter painter,
                                      int quad)
      • drawTicksAndLabels

        public void drawTicksAndLabels​(IPainter painter)
      • drawTicksAndLabelsX

        public void drawTicksAndLabelsX​(IPainter painter)
      • drawTicksAndLabelsY

        public void drawTicksAndLabelsY​(IPainter painter)
      • drawTicksAndLabelsZ

        public void drawTicksAndLabelsZ​(IPainter painter)
      • isZAxeLabelDisplayed

        protected boolean isZAxeLabelDisplayed​(int direction)
      • isYAxeLabelDisplayed

        protected boolean isYAxeLabelDisplayed​(int direction)
      • isXAxeLabelDisplayed

        protected boolean isXAxeLabelDisplayed​(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

        protected int findClosestXaxe​(Camera cam)
        Selects the closest displayable X axe from camera
      • findClosestYaxe

        protected int findClosestYaxe​(Camera cam)
        Selects the closest displayable Y axe from camera
      • findClosestZaxe

        protected int findClosestZaxe​(Camera cam)
        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

        protected void updateHiddenQuads​(IPainter painter)
      • getHiddenQuads

        protected boolean[] getHiddenQuads​(IPainter painter)
        Computes the visibility of each cube face.
      • getHiddenQuads

        public boolean[] getHiddenQuads​(Coord3d scaledEye,
                                        Coord3d center)
      • 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()
        Specified by:
        dispose in interface IAxis
      • getView

        public View getView()
      • setView

        public void setView​(View view)
        When setting a current view, the AxeBox can know the view is on mode CameraMode.TOP, and optimize some axis placement.
      • getWholeBounds

        public BoundingBox3d getWholeBounds()
        Return the boundingBox of this axis, including the volume occupied by the texts. This requires calling draw() before, which computes actual ticks position in 3d, and updates the bounds.
        Specified by:
        getWholeBounds in interface IAxis
      • setScale

        public void setScale​(Coord3d scale)
        Set the scaling factor that are applyed on this object before GL2 commands.
        Specified by:
        setScale in interface IAxis
      • addAnnotation

        public void addAnnotation​(AxeAnnotation annotation)
      • getQuadX

        public float[][] getQuadX()
      • getQuadY

        public float[][] getQuadY()
      • getQuadZ

        public float[][] getQuadZ()
      • getQuadIsHidden

        public boolean[] getQuadIsHidden()