Axis
Package: com.hypixel.hytale.math
public enum AxisRepresents the three spatial axes (X, Y, Z). Each constant carries a unit direction vector and provides rotation and flip operations for both integer and double 3D vectors. Rotations are performed in 90-degree increments.
Enum Constants
Section titled “Enum Constants”| Constant | Direction | Description |
|---|---|---|
X | (1, 0, 0) | The X axis. |
Y | (0, 1, 0) | The Y axis. |
Z | (0, 0, 1) | The Z axis. |
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
getDirection() | Vector3i | Returns a clone of the unit direction vector for this axis. |
rotate(@Nonnull Vector3i vector, int angle) | void | Rotates an integer vector around this axis by the given angle in degrees (must be a multiple of 90). |
rotate(@Nonnull Vector3d vector, int angle) | void | Rotates a double vector around this axis by the given angle in degrees. |
rotate(@Nonnull Vector3i vector) | void | Rotates an integer vector 90 degrees around this axis. |
rotate(@Nonnull Vector3d vector) | void | Rotates a double vector 90 degrees around this axis. |
flip(@Nonnull Vector3i vector) | void | Negates the component of the integer vector along this axis. |
flip(@Nonnull Vector3d vector) | void | Negates the component of the double vector along this axis. |
flipRotation(@Nonnull Vector3f rotation) | void | Flips the rotation angle (yaw/pitch) corresponding to this axis. |
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.