Package uk.ac.starlink.ttools.plot2.geom
Class CubeAspect
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.geom.CubeAspect
-
public class CubeAspect extends java.lang.ObjectDefines the data range covered by a CubeSurface.- Since:
- 20 Feb 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description CubeAspect(double[] xlimits, double[] ylimits, double[] zlimits, double[] rotmat, double zoom, double xoff, double yoff)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]getLimits()Returns 3D data bounds.doublegetOffsetX()Return graphics X offset.doublegetOffsetY()Return graphics Y offset.double[]getRotation()Returns rotation matrix.doublegetZoom()Returns zoom factor.
-
-
-
Constructor Detail
-
CubeAspect
public CubeAspect(double[] xlimits, double[] ylimits, double[] zlimits, double[] rotmat, double zoom, double xoff, double yoff)Constructor.- Parameters:
xlimits- 2-element array giving (min,max) X data coordinatesylimits- 2-element array giving (min,max) Y data coordinateszlimits- 2-element array giving (min,max) Z data coordinatesrotmat- 9-element rotation matrix applied before viewingzoom- zoom factor, 1 means cube roughly fills plot boundsxoff- graphics X offset in pixels, 0 means centred in plot boundsyoff- graphics Y offset in pixels, 0 means centred in plot bounds
-
-
Method Detail
-
getRotation
public double[] getRotation()
Returns rotation matrix.- Returns:
- 9-element rotation matrix
-
getZoom
public double getZoom()
Returns zoom factor.- Returns:
- zoom factor, 1 means cube roughly fills plot bounds
-
getOffsetX
public double getOffsetX()
Return graphics X offset.- Returns:
- X offset in pixels, 0 means centred in plot bounds
-
getOffsetY
public double getOffsetY()
Return graphics Y offset.- Returns:
- Y offset in pixels, 0 means centred in plot bounds
-
getLimits
public double[][] getLimits()
Returns 3D data bounds.- Returns:
- [3][2]-element array giving (min,max) data bounds for X, Y, Z
-
-