Rotation
final class Rotation
Package: dev.joid.lib.render.transform · Module: core · Source: Rotation.java
The axis of a rotation in a Transformation, as yaw, pitch and roll components.
Description
Section titled “Description”ROLL turns the drawing in the plane of the screen; YAW and PITCH turn it in depth.
The components are read each time the rotation is applied.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
Rotation | create(double yaw, double pitch, double roll) factory | Creates the axis with the components yaw (Y axis), pitch (X axis) and roll (Z axis). |
Rotation | create(Supplier | Creates an axis whose components are read from the suppliers each time it is applied. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
double | getYaw() | Returns the component along the vertical axis. |
double | getRoll() | Returns the component along the axis that points out of the screen. |
double | getPitch() | Returns the component along the horizontal axis. |
Supplier<Double> | getYawSupplier() | Returns the supplier of the yaw component. |
Supplier<Double> | getPitchSupplier() | Returns the supplier of the pitch component. |
Supplier<Double> | getRollSupplier() | Returns the supplier of the roll component. |
Constants and fields
Section titled “Constants and fields”| Type | Name | Value | Summary |
|---|---|---|---|
Rotation | YAW | new Rotation(1D, 0D, 0D) | Turns around the vertical axis. |
Rotation | ROLL | new Rotation(0D, 0D, 1D) | Turns in the plane of the screen, around the axis that points out of it. |
Rotation | PITCH | new Rotation(0D, 1D, 0D) | Turns around the horizontal axis. |
Creation details
Section titled “Creation details”create
Section titled “create”Rotation create(double yaw, double pitch, double roll) factory
Creates the axis with the components yaw (Y axis), pitch (X axis) and roll (Z axis).
Rotation create(Supplier<Double> yawSupplier, Supplier<Double> pitchSupplier, Supplier<Double> rollSupplier) factory
Creates an axis whose components are read from the suppliers each time it is applied.
Method details
Section titled “Method details”getYaw
Section titled “getYaw”double getYaw()
Returns the component along the vertical axis.
getRoll
Section titled “getRoll”double getRoll()
Returns the component along the axis that points out of the screen.
getPitch
Section titled “getPitch”double getPitch()
Returns the component along the horizontal axis.
getYawSupplier
Section titled “getYawSupplier”Supplier<Double> getYawSupplier()
Returns the supplier of the yaw component.
getPitchSupplier
Section titled “getPitchSupplier”Supplier<Double> getPitchSupplier()
Returns the supplier of the pitch component.
getRollSupplier
Section titled “getRollSupplier”Supplier<Double> getRollSupplier()
Returns the supplier of the roll component.
Constant and field details
Section titled “Constant and field details”Rotation YAW
Turns around the vertical axis.
Rotation ROLL
Turns in the plane of the screen, around the axis that points out of it.
Rotation PITCH
Turns around the horizontal axis.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
