Class Simple2D

    • Field Detail

      • dim1

        private int dim1
        Dimensions for fast projection mode.
      • dim2

        private int dim2
        Dimensions for fast projection mode.
    • Constructor Detail

      • Simple2D

        public Simple2D​(Projector p,
                        LinearScale[] scales,
                        int ax1,
                        int ax2)
        Constructor with a given database and axes.
        Parameters:
        p - Projector
        scales - Scales to use
        ax1 - First axis
        ax2 - Second axis
    • Method Detail

      • fastProjectDataToRenderSpace

        public double[] fastProjectDataToRenderSpace​(double[] data)
        Description copied from interface: Projection2D
        Project a data vector from data space to rendering space.
        Specified by:
        fastProjectDataToRenderSpace in interface Projection2D
        Parameters:
        data - vector in data space
        Returns:
        vector in rendering space
      • fastProjectDataToRenderSpace

        public double[] fastProjectDataToRenderSpace​(NumberVector data)
        Description copied from interface: Projection2D
        Project a data vector from data space to rendering space.
        Specified by:
        fastProjectDataToRenderSpace in interface Projection2D
        Parameters:
        data - vector in data space
        Returns:
        vector in rendering space
      • fastProjectDataToScaledSpace

        public double[] fastProjectDataToScaledSpace​(double[] data)
        Description copied from interface: Projection2D
        Project a data vector from data space to scaled space.
        Specified by:
        fastProjectDataToScaledSpace in interface Projection2D
        Parameters:
        data - vector in data space
        Returns:
        vector in scaled space
      • fastProjectDataToScaledSpace

        public double[] fastProjectDataToScaledSpace​(NumberVector data)
        Description copied from interface: Projection2D
        Project a data vector from data space to scaled space.
        Specified by:
        fastProjectDataToScaledSpace in interface Projection2D
        Parameters:
        data - vector in data space
        Returns:
        vector in scaled space
      • fastProjectScaledToRenderSpace

        public double[] fastProjectScaledToRenderSpace​(double[] v)
        Description copied from interface: Projection2D
        Project a vector from scaled space to rendering space.
        Specified by:
        fastProjectScaledToRenderSpace in interface Projection2D
        Parameters:
        v - vector in scaled space
        Returns:
        vector in rendering space
      • fastProjectRenderToDataSpace

        public double[] fastProjectRenderToDataSpace​(double x,
                                                     double y)
        Description copied from interface: Projection2D
        Project a data vector from rendering space to data space.
        Specified by:
        fastProjectRenderToDataSpace in interface Projection2D
        Parameters:
        x - X coordinate
        y - Y coordinate
        Returns:
        vector in data space
      • fastProjectRenderToScaledSpace

        public double[] fastProjectRenderToScaledSpace​(double x,
                                                       double y)
        Description copied from interface: Projection2D
        Project a vector from rendering space to scaled space.
        Specified by:
        fastProjectRenderToScaledSpace in interface Projection2D
        Parameters:
        x - X coordinate
        y - Y coordinate
        Returns:
        vector in scaled space
      • fastProjectRelativeDataToRenderSpace

        public double[] fastProjectRelativeDataToRenderSpace​(double[] data)
        Description copied from interface: Projection2D
        Project a data vector from data space to rendering space.
        Specified by:
        fastProjectRelativeDataToRenderSpace in interface Projection2D
        Parameters:
        data - vector in data space
        Returns:
        vector in rendering space
      • fastProjectRelativeDataToRenderSpace

        public double[] fastProjectRelativeDataToRenderSpace​(NumberVector data)
        Description copied from interface: Projection2D
        Project a data vector from data space to rendering space.
        Specified by:
        fastProjectRelativeDataToRenderSpace in interface Projection2D
        Parameters:
        data - vector in data space
        Returns:
        vector in rendering space
      • fastProjectRelativeScaledToRenderSpace

        public double[] fastProjectRelativeScaledToRenderSpace​(double[] vr)
        Description copied from interface: Projection2D
        Project a vector from scaled space to rendering space.
        Specified by:
        fastProjectRelativeScaledToRenderSpace in interface Projection2D
        Parameters:
        vr - vector in scaled space
        Returns:
        vector in rendering space
      • getVisibleDimensions2D

        public long[] getVisibleDimensions2D()
        Description copied from interface: Projection2D
        Get a bit set of dimensions that are visible.
        Specified by:
        getVisibleDimensions2D in interface Projection2D
        Returns:
        Bit set, first dimension is bit 0.
      • estimateViewport

        public CanvasSize estimateViewport()
        Description copied from interface: Projection2D
        Estimate the viewport requirements
        Specified by:
        estimateViewport in interface Projection2D
        Returns:
        Canvas size obtained from projecting scale endpoints
      • dearrange

        protected double[] dearrange​(double[] v)
        Description copied from class: AbstractSimpleProjection
        Undo the rearrangement of components.
        Specified by:
        dearrange in class AbstractSimpleProjection
        Parameters:
        v - double[] to undo the rearrangement
        Returns:
        rearranged-undone copy