Package uk.ac.starlink.ttools.plot2.geom
Class CubeDataGeom
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.geom.CubeDataGeom
-
-
Field Summary
Fields Modifier and Type Field Description static CubeDataGeom
INSTANCE
Singleton instance.static FloatingCoord
X_COORD
X coordinate.static FloatingCoord
Y_COORD
Y coordinate.static FloatingCoord
Z_COORD
Z coordinate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDataDimCount()
Returns 3.Coord[]
getPosCoords()
Returns the definitions for the user-supplied coordinates that indicate plot positions.java.lang.String
getVariantName()
Returns a label for this DataGeom.boolean
readDataPos(Tuple tuple, int ic, double[] dpos)
Determines the positional coordinates in data space for a supplied tuple.
-
-
-
Field Detail
-
X_COORD
public static final FloatingCoord X_COORD
X coordinate.
-
Y_COORD
public static final FloatingCoord Y_COORD
Y coordinate.
-
Z_COORD
public static final FloatingCoord Z_COORD
Z coordinate.
-
INSTANCE
public static CubeDataGeom INSTANCE
Singleton instance.
-
-
Method Detail
-
getDataDimCount
public int getDataDimCount()
Returns 3.- Specified by:
getDataDimCount
in interfaceDataGeom
- Returns:
- number of elements in data space coordinate array
-
getVariantName
public java.lang.String getVariantName()
Description copied from interface:DataGeom
Returns 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:
getVariantName
in interfaceDataGeom
- Returns:
- user-directed input coordinate type name
-
getPosCoords
public Coord[] getPosCoords()
Description copied from interface:DataGeom
Returns the definitions for the user-supplied coordinates that indicate plot positions.- Specified by:
getPosCoords
in interfaceDataGeom
- Returns:
- coordinate quantity array for this geometry
-
readDataPos
public boolean readDataPos(Tuple tuple, int ic, double[] dpos)
Description copied from interface:DataGeom
Determines 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:
readDataPos
in interfaceDataGeom
- Parameters:
tuple
- coordinate tupleic
- column index intuple
at which the positional information startsdpos
- array into which data space coordinates are written- Returns:
- true iff conversion was successful
-
-