Package uk.ac.starlink.ttools.plot2.geom
Class PlaneDataGeom
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.PlaneDataGeom
- All Implemented Interfaces:
DataGeom
Defines positional data coordinates used by a 2-D Cartesian plot.
- Since:
- 19 Feb 2013
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PlaneDataGeomStandard instance.static final FloatingCoordHorizontal coordinate.static final FloatingCoordVertical coordinate. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns 2.Coord[]Returns the definitions for the user-supplied coordinates that indicate plot positions.Returns a label for this DataGeom.booleanreadDataPos(Tuple tuple, int ic, double[] dpos) Determines the positional coordinates in data space for a supplied tuple.
-
Field Details
-
X_COORD
Horizontal coordinate. -
Y_COORD
Vertical coordinate. -
INSTANCE
Standard instance.
-
-
Constructor Details
-
PlaneDataGeom
protected PlaneDataGeom()Constructor.
-
-
Method Details
-
getDataDimCount
public int getDataDimCount()Returns 2.- Specified by:
getDataDimCountin interfaceDataGeom- Returns:
- number of elements in data space coordinate array
-
getVariantName
Description copied from interface:DataGeomReturns a label for this DataGeom. It may be used to distinguish from other geoms used in the same plot type, so for instance call it "Cartesian" or "Polar" rather than "Plane" if it's X,Y.- Specified by:
getVariantNamein interfaceDataGeom- Returns:
- user-directed input coordinate type name
-
getPosCoords
Description copied from interface:DataGeomReturns the definitions for the user-supplied coordinates that indicate plot positions.- Specified by:
getPosCoordsin interfaceDataGeom- Returns:
- coordinate quantity array for this geometry
-
readDataPos
Description copied from interface:DataGeomDetermines the positional coordinates in data space for a supplied tuple.A parameter supplies the index of the field in the tuple at which the positional coordinate(s) can be found. Each position is represented by
DataGeom.getPosCoords()columns of the tuple. By convention positions are at the start of the tuple, so if there is one position in the tuple it will be at icol=0, and there are multiple positions the N'th one will be at icol=N*getPosCoords().An array of (at least)
DataGeom.getDataDimCount()elements is supplied, and on success the data space coordinate values are written into it.- Specified by:
readDataPosin interfaceDataGeom- Parameters:
tuple- coordinate tupleic- column index intupleat which the positional information startsdpos- array into which data space coordinates are written- Returns:
- true iff conversion was successful
-