Class CubeAspect
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.CubeAspect
Defines the data range covered by a CubeSurface.
- Since:
- 20 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionCubeAspect(double[] xlimits, double[] ylimits, double[] zlimits, double[] rotmat, double zoom, double xoff, double yoff) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]Returns 3D data bounds.doubleReturn graphics X offset.doubleReturn graphics Y offset.double[]Returns rotation matrix.doublegetZoom()Returns zoom factor.
-
Constructor Details
-
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 Details
-
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
-