Modifier and Type | Field and Description |
---|---|
static String |
INVALID_AXIS_INDEX
Human-readable error message used when an invalid
int -value for axis is
passed. |
static String |
INVALID_AXIS_STRING
Human-readable error message used when an invalid
String -value for axis is
passed. |
Modifier and Type | Method and Description |
---|---|
static Axis |
createFromString(String axisAsString)
Maps a string of x, y, z (case ignored) to a corresponding axis type.
|
static int |
dimensionIndexFor(Axis axis)
A corresponding index representing for the dimension an
Axis represents. |
static int |
valueFor(Axis axis,
int x,
int y,
int z)
Multiplexes the a value corresponding to a particular axis.
|
public static final String INVALID_AXIS_STRING
String
-value for axis
is
passed.public static final String INVALID_AXIS_INDEX
int
-value for axis
is
passed.public static Axis createFromString(String axisAsString) throws AxisConversionException
axisAsString
- the string indicating the axis.Axis
for axisAsString
.AxisConversionException
- if axisAsString
does not correspond to an axis.public static int dimensionIndexFor(Axis axis) throws AxisConversionException
Axis
represents.
This is 0
for the X-axis, 1
for the Y-axis, and 2
for the Z-axis.
axis
- the axis to find an index for.axis
.AxisConversionException
- if axis
is unrecognized.public static int valueFor(Axis axis, int x, int y, int z)
axis
- the axis used to select a value.x
- a possible-value, representing the X-axis.y
- a possible-value, representing the Y-axis.z
- a possible-value, representing the Z-axis.x
or y
or z
corresponding to axis
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.