# Class CubeAspect

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.CubeAspect

public class CubeAspect extends Object
Defines 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

Modifier and Type
Method
Description
`double[][]`
`getLimits()`
Returns 3D data bounds.
`double`
`getOffsetX()`
Return graphics X offset.
`double`
`getOffsetY()`
Return graphics Y offset.
`double[]`
`getRotation()`
Returns rotation matrix.
`double`
`getZoom()`
Returns zoom factor.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 coordinates
  `ylimits` - 2-element array giving (min,max) Y data coordinates
  `zlimits` - 2-element array giving (min,max) Z data coordinates
  `rotmat` - 9-element rotation matrix applied before viewing
  `zoom` - zoom factor, 1 means cube roughly fills plot bounds
  `xoff` - graphics X offset in pixels, 0 means centred in plot bounds
  `yoff` - 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