-
public class Quaternion.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Quaternion.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final QuaternionfromAxisAngle(Float3 axis, Float angle)Construct a Quaternion from an axis and angle in degrees final QuaternionfromEuler(Float3 d, RotationsOrder order)Construct a Quaternion from Euler angles using YPR around a specified orderUses intrinsic Tait-Bryan angles. final QuaternionfromEuler(Float yaw, Float pitch, Float roll, RotationsOrder order)Construct a Quaternion from Euler yaw, pitch, roll around a specified order. -
-
Method Detail
-
fromAxisAngle
final Quaternion fromAxisAngle(Float3 axis, Float angle)
Construct a Quaternion from an axis and angle in degrees
- Parameters:
axis- Rotation directionangle- Angle size in degrees
-
fromEuler
final Quaternion fromEuler(Float3 d, RotationsOrder order)
Construct a Quaternion from Euler angles using YPR around a specified order
Uses intrinsic Tait-Bryan angles. This means that rotations are performed with respect to the local coordinate system. That is, for order 'XYZ', the rotation is first around the X axis (which is the same as the world-X axis), then around local-Y (which may now be different from the world Y-axis), then local-Z (which may be different from the world Z-axis)
- Parameters:
d- Per axis Euler angles in degrees Yaw, pitch, roll (YPR) are taken accordingly to the rotations order input.order- The order in which to apply rotations.
-
fromEuler
final Quaternion fromEuler(Float yaw, Float pitch, Float roll, RotationsOrder order)
Construct a Quaternion from Euler yaw, pitch, roll around a specified order.
- Parameters:
yaw- about 3rd rotation axis in radians.pitch- about 2nd rotation axis in radians.roll- about 1st rotation axis in radians.order- The order in which to apply rotations.
-
-
-
-