Class WorldTransform


  • public final class WorldTransform
    extends java.lang.Object
    • Field Detail

      • wcx

        private double wcx
      • wcy

        private double wcy
      • pcx

        private int pcx
      • pcy

        private int pcy
      • canvasWidth

        private int canvasWidth
      • canvasHeight

        private int canvasHeight
      • dataAreaWidth

        private int dataAreaWidth
      • dataAreaHeight

        private int dataAreaHeight
      • dpdwx

        private double dpdwx
      • dpdwy

        private double dpdwy
      • leftMargin

        private int leftMargin
      • rightMargin

        private int rightMargin
      • topMargin

        private int topMargin
      • bottomMargin

        private int bottomMargin
      • xRescalable

        private boolean xRescalable
      • yRescalable

        private boolean yRescalable
      • recordRange

        private boolean recordRange
      • aspectRatio

        private double aspectRatio
      • constantAspectRatio

        private boolean constantAspectRatio
      • vxmin

        private double vxmin
      • vxmax

        private double vxmax
      • vymin

        private double vymin
      • vymax

        private double vymax
      • trialPanning

        private boolean trialPanning
      • wcxtp

        private double wcxtp
      • wcytp

        private double wcytp
      • w2cx

        private double w2cx
      • w2cy

        private double w2cy
      • w2cz

        private double w2cz
      • w3cx

        private double w3cx
      • w3cy

        private double w3cy
      • w3cz

        private double w3cz
      • m3xx

        private double m3xx
      • m3yy

        private double m3yy
      • m3zz

        private double m3zz
      • m3xy

        private double m3xy
      • m3xz

        private double m3xz
      • m3yx

        private double m3yx
      • m3yz

        private double m3yz
      • m3zx

        private double m3zx
      • m3zy

        private double m3zy
      • m3B

        private double[][] m3B
      • zoomCenX

        private double zoomCenX
      • zoomCenY

        private double zoomCenY
      • dpdwx0

        private double dpdwx0
      • dpdwy0

        private double dpdwy0
      • wcx0

        private double wcx0
      • wcy0

        private double wcy0
      • rangeListeners

        private java.util.ArrayList<RangeListener> rangeListeners
      • p_pixelSize

        private final Size p_pixelSize
    • Constructor Detail

      • WorldTransform

        public WorldTransform()
    • Method Detail

      • setCanvasSize

        public void setCanvasSize​(int w,
                                  int h)
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getLeftMargin

        public int getLeftMargin()
      • getBottomMargin

        public int getBottomMargin()
      • setMargins

        public void setMargins​(int l,
                               int r,
                               int b,
                               int t)
      • isOnCanvas

        public boolean isOnCanvas​(double x,
                                  double y)
      • intIsOnCanvas

        public boolean intIsOnCanvas​(int x,
                                     int y)
      • addRangeListener

        public void addRangeListener​(RangeListener rl)
      • setRotationListener

        public void setRotationListener​(RotationListener rl)
      • fixRanges

        public void fixRanges()
      • rangeChange

        public void rangeChange()
      • notifyRangeChange

        public void notifyRangeChange()
      • setPixelScalingFromTop

        public void setPixelScalingFromTop​(double d)
      • setAspectRatioFree

        public void setAspectRatioFree()
      • setFixedAspectRatio

        public void setFixedAspectRatio​(double f)
      • setAspectRatio

        public void setAspectRatio​(double f)
      • setXRescalable

        public void setXRescalable​(boolean b)
      • setYRescalable

        public void setYRescalable​(boolean b)
      • clearRanges

        void clearRanges()
      • startRangeRecording

        void startRangeRecording()
      • stopRangeRecording

        void stopRangeRecording()
      • setWidth

        public void setWidth​(int w)
      • setHeight

        public void setHeight​(int h)
      • getCanvasWidth

        public int getCanvasWidth()
      • getCanvasHeight

        public int getCanvasHeight()
      • getWorldCanvasWidth

        public double getWorldCanvasWidth()
      • isShowing

        public boolean isShowing​(double x,
                                 double y)
      • intDeviceX

        int[] intDeviceX​(double[] wx)
      • intDeviceY

        int[] intDeviceY​(double[] wy)
      • floatDeviceX

        float[] floatDeviceX​(double[] wx)
      • floatDeviceY

        float[] floatDeviceY​(double[] wy)
      • getPixelSize

        public Size getPixelSize()
      • getPixelArea

        public double getPixelArea()
      • wopx

        protected double wopx​(int x)
      • wopy

        protected double wopy​(int y)
      • xpix

        protected int xpix​(double xr)
      • ypix

        protected int ypix​(double yr)
      • powx

        protected int powx​(double xr)
      • powy

        protected int powy​(double yr)
      • fpowx

        protected float fpowx​(double xr)
      • fpowy

        protected float fpowy​(double yr)
      • qpowx

        private int qpowx​(double xr)
      • qpowy

        private int qpowy​(double yr)
      • pubPowx

        public int pubPowx​(double xr)
      • pubPowy

        public int pubPowy​(double yr)
      • getWorldPosition

        public Position getWorldPosition​(int x,
                                         int y)
      • pubWopx

        public double pubWopx​(int x)
      • pubWopy

        public double pubWopy​(int y)
      • pubPixDx

        public int pubPixDx​(double dxr)
      • pubPixDy

        public int pubPixDy​(double dyr)
      • dPdX

        public double dPdX()
      • dPdY

        public double dPdY()
      • pubDyDpix

        public double pubDyDpix()
      • pubDxDpix

        public double pubDxDpix()
      • wxLeft

        public double wxLeft()
      • wxRight

        public double wxRight()
      • wyBottom

        public double wyBottom()
      • wyTop

        public double wyTop()
      • enforceAspectRatioY

        private void enforceAspectRatioY()
      • enforceAspectRatioX

        private void enforceAspectRatioX()
      • zoomAbout

        private void zoomAbout​(double f,
                               int xc,
                               int yc)
      • zoomAbout

        private void zoomAbout​(double fx,
                               double fy,
                               int xc,
                               int yc)
      • xZoomAbout

        private void xZoomAbout​(double f,
                                int xc)
      • yZoomAbout

        private void yZoomAbout​(double f,
                                int yc)
      • initializeZoom

        void initializeZoom​(int xc,
                            int yc)
      • dragZoom

        void dragZoom​(double fxin,
                      double fyin,
                      int xc,
                      int yc)
      • reframe

        public void reframe​(Box b)
      • setXRange

        public void setXRange​(double xl,
                              double xh)
      • setYRange

        public void setYRange​(double yl,
                              double yh)
      • pSetXRange

        private void pSetXRange​(double xlin,
                                double xhin)
      • ensureCovers

        public void ensureCovers​(double xl,
                                 double yl,
                                 double xh,
                                 double yh)
      • pSetYRange

        private void pSetYRange​(double ylin,
                                double yhin)
      • getXYXYLimits

        public double[] getXYXYLimits()
      • getXRange

        public double[] getXRange()
      • getYRange

        public double[] getYRange()
      • setXYXYLimits

        public void setXYXYLimits​(double xl,
                                  double yl,
                                  double xh,
                                  double yh)
      • applyRecordedRange

        void applyRecordedRange()
      • boxSelected

        public void boxSelected​(int x0,
                                int y0,
                                int x1,
                                int y1)
      • zoom

        void zoom​(double fac,
                  int xc,
                  int yc)
      • zoom

        void zoom​(double xfac,
                  double yfac,
                  int xc,
                  int yc)
      • trialPan

        void trialPan​(int xfrom,
                      int yfrom,
                      int xto,
                      int yto)
      • permanentPan

        void permanentPan​(int xfrom,
                          int yfrom,
                          int xto,
                          int yto)
      • getIntPosition

        public int[] getIntPosition​(double x,
                                    double y)
      • xProj

        protected double xProj​(double x,
                               double y,
                               double z)
      • yProj

        protected double yProj​(double x,
                               double y,
                               double z)
      • zProj

        protected double zProj​(double x,
                               double y,
                               double z)
      • project

        public double[] project​(double x,
                                double y,
                                double z)
      • deProject

        public double[] deProject​(double x,
                                  double y,
                                  double z)
      • initializeRotation

        public void initializeRotation​(int ixcen,
                                       int iycen)
      • initializeRotationLocal

        public void initializeRotationLocal​(double x,
                                            double y,
                                            double z)
      • initializeRotation

        public void initializeRotation​(double x,
                                       double y,
                                       double z)
      • applyRotation

        void applyRotation​(double[][] mr)
      • axisRotate

        void axisRotate​(double thax,
                        double thr)
      • zRotate

        public void zRotate​(double theta)
      • printRot

        public void printRot()
      • dragZRotate

        public void dragZRotate​(int idx,
                                int idy)
      • dragRollRotate

        public void dragRollRotate​(int idx,
                                   int idy)
      • visible3D

        public boolean visible3D​(double x,
                                 double y,
                                 double z)
      • getProjectionMatrix

        public double[][] getProjectionMatrix()
      • get3Center

        public double[] get3Center()
      • get2Center

        public double[] get2Center()
      • setProjectionMatrix

        public void setProjectionMatrix​(double[][] pm)
      • set3Center

        public void set3Center​(double[] cen)
      • set2Center

        public void set2Center​(double[] cen)
      • setScale

        public void setScale​(double sf)
      • getScale

        public double getScale()