Package xyz.gmitch215.socketmc.util.math
Interface Axis
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Utility functional interface to convert a rotation amount to a
Quaternionf
. Commonly represents an axis of rotation.-
Field Summary
Modifier and TypeFieldDescriptionstatic final Axis
Represents the Y axis on the negative side.static final Axis
Represents the X axis on the positive side.static final Axis
Represents the Y axis on the negative side.static final Axis
Represents the Y axis on the positive side.static final Axis
Represents the Z axis on the negative side.static final Axis
Represents the Z axis on the positive side. -
Method Summary
-
Field Details
-
X_POSITIVE
Represents the X axis on the positive side. -
X_NEGATIVE
Represents the Y axis on the negative side. -
Y_POSITIVE
Represents the Y axis on the positive side. -
Y_NEGATIVE
Represents the Y axis on the negative side. -
Z_POSITIVE
Represents the Z axis on the positive side. -
Z_NEGATIVE
Represents the Z axis on the negative side.
-
-
Method Details
-
of
Creates an axis of rotation from the givenVector3f
.- Parameters:
axis
- The axis to rotate around.- Returns:
- The new axis.
- Throws:
IllegalArgumentException
- if the axis is null
-
rotation
Rotates the axis by the given radians.- Parameters:
radians
- The amount to rotate the axis by.- Returns:
- The new axis.
-