public abstract class Tuple3i extends Object implements ReadableTuple3i
Modifier and Type | Field and Description |
---|---|
protected int |
x
X-axis component of the tuple.
|
protected int |
y
Y-axis component of the tuple.
|
protected int |
z
Z-axis component of the tuple.
|
Constructor and Description |
---|
Tuple3i() |
Modifier and Type | Method and Description |
---|---|
void |
add(ReadableTuple3i toAdd)
Arithmetically adds a
ReadableTuple3i 's values across each dimension. |
protected boolean |
canEqual(Object other) |
void |
decrementX()
Decrements the X component's value by one.
|
void |
decrementX(int shift)
Decrements the X component's value by a shift.
|
void |
decrementY()
Decrements the Y component's value by one.
|
void |
decrementY(int shift)
Decrements the Y component's value by a shift.
|
void |
decrementZ()
Decrements the Z component's value by one.
|
void |
decrementZ(int shift)
Decrements the Z component's value by a shift.
|
void |
divideBy(int divisor)
Arithmetically divide by a value across each dimension.
|
boolean |
equals(Object o) |
int |
hashCode() |
void |
incrementX()
Increments the X component's value by one.
|
void |
incrementX(int shift)
Increments the X component's value by a shift.
|
void |
incrementY()
Increments the Y component's value by one.
|
void |
incrementY(int shift)
Increments the Y component's value by a shift.
|
void |
incrementZ()
Increments the Z component's value by one.
|
void |
incrementZ(int shift)
Increments the Z component's value by a shift.
|
Point3i |
max(int value)
Element-wise maximum between this point and a scalar.
|
Point3i |
max(ReadableTuple3i point)
Element-wise maximum between this point and another.
|
Point3i |
min(ReadableTuple3i point)
Element-wise minimum between this point and another.
|
void |
scale(double factor)
Arithmetically multiplies by a value across each dimension.
|
void |
scale(int factor)
Arithmetically multiplies by a value across each dimension.
|
void |
scaleX(double factor)
Arithmetically multiplies the X-axis component by a value.
|
void |
scaleXY(double factor)
Arithmetically multiplies the X- and Y-axis components by a value.
|
void |
scaleY(double factor)
Arithmetically multiplies the Y-axis component by a value.
|
void |
setX(int x)
X-axis component of the tuple.
|
void |
setY(int y)
Y-axis component of the tuple.
|
void |
setZ(int z)
Z-axis component of the tuple.
|
void |
subtract(int valueToSubtract)
Arithmetically subtracts a value across each dimension.
|
void |
subtract(ReadableTuple3i valueToSubtract)
Arithmetically subtracts a value across each dimension.
|
String |
toString() |
int |
valueByDimension(Axis axis)
A component of a tuple corresponding to a particular axis.
|
int |
valueByDimension(int dimensionIndex)
A component of a tuple corresponding to a particular dimension by index.
|
int |
x()
X-axis component of the tuple.
|
int |
y()
Y-axis component of the tuple.
|
int |
z()
Z-axis component of the tuple.
|
compareTo, duplicateChangeZ, matchAllDimensions, matchAllDimensions
protected int x
protected int y
protected int z
public final void add(ReadableTuple3i toAdd)
ReadableTuple3i
's values across each dimension.toAdd
- tuple to add to current state.public final void subtract(int valueToSubtract)
valueToSubtract
- value to subtract.public final void subtract(ReadableTuple3i valueToSubtract)
valueToSubtract
- value to subtract, for each respective dimension.public final void scale(int factor)
factor
- value to multiply by.public final void scale(double factor)
factor
- value to multiply by.public final void divideBy(int divisor)
divisor
- value to divide by.public final void scaleX(double factor)
factor
- value to multiply by.public final void scaleY(double factor)
factor
- value to multiply by.public final void scaleXY(double factor)
factor
- value to multiply by.public Point3i min(ReadableTuple3i point)
point
- the other point.public Point3i max(ReadableTuple3i point)
point
- the other point.public Point3i max(int value)
value
- the scalar.public final int valueByDimension(int dimensionIndex)
valueByDimension
in interface ReadableTuple3i
dimensionIndex
- the index corresponding to an axis, as per AxisConverter
.public final int valueByDimension(Axis axis)
ReadableTuple3i
valueByDimension
in interface ReadableTuple3i
axis
- the axis.public final void incrementX()
public final void incrementY()
public final void incrementZ()
public final void incrementX(int shift)
shift
- how much to increment by.public final void incrementY(int shift)
shift
- how much to increment by.public final void incrementZ(int shift)
shift
- how much to increment by.public final void decrementX()
public final void decrementY()
public final void decrementZ()
public final void decrementX(int shift)
shift
- how much to decrement by.public final void decrementY(int shift)
shift
- how much to decrement by.public final void decrementZ(int shift)
shift
- how much to decrement by.public int x()
ReadableTuple3i
x
in interface ReadableTuple3i
public int y()
ReadableTuple3i
y
in interface ReadableTuple3i
public int z()
ReadableTuple3i
z
in interface ReadableTuple3i
protected boolean canEqual(Object other)
public void setX(int x)
public void setY(int y)
public void setZ(int z)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.