Interface Rotation
-
- All Superinterfaces:
DefaultedRegistryValue
@CatalogedBy(Rotations.class) public interface Rotation extends DefaultedRegistryValue
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Rotation
and(Rotation rotation)
Angle
angle()
Gets the the rotation in degrees always in clockwise order.default Matrix4d
toRotationMatrix()
Gets the4D rotation matrix
of this rotation.-
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
-
-
-
Method Detail
-
angle
Angle angle()
Gets the the rotation in degrees always in clockwise order.- Returns:
- The rotation
-
toRotationMatrix
default Matrix4d toRotationMatrix()
Gets the4D rotation matrix
of this rotation.Minecraft's coordinate system is different than traditional systems applying the semantic meaning behind the
x
andz
axis. These natures are described as below:- The x-axis indicates the east (when positive) or west
(when negative) of the origin point
(0, 0, 0)
- The z-axis indicates the south (when positive) or north
(when negative) of the origin point
(0, 0, 0)
These rules differ from traditional coordinate interpretations and therefore may be unintuitive when a rotation of
90
degrees will instead rotate the coordinates(1, 1, 1)
across the pivot(0, 0, 0)
- Returns:
- The euler matrix that represents this rotation in the X-Z plane.
- The x-axis indicates the east (when positive) or west
(when negative) of the origin point
-
-