Package eu.svjatoslav.sixth.e3d.math
Class Rotation
java.lang.Object
eu.svjatoslav.sixth.e3d.math.Rotation
- All Implemented Interfaces:
Cloneable
Represents a rotation in 3D space using two Euler angles (XZ and YZ).
Angles are stored with precomputed sine and cosine values for efficient repeated rotation operations without recalculating trigonometric functions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Rotation
public Rotation() -
Rotation
public Rotation(double angleXZ, double angleYZ) Creates a rotation with the specified Euler angles.- Parameters:
angleXZ- the angle around the XZ axis (yaw) in radiansangleYZ- the angle around the YZ axis (pitch) in radians
-
-
Method Details
-
clone
-
rotate
Rotates a point around the origin using this rotation's angles.- Parameters:
point3d- the point to rotate (modified in place)
-
rotate
public void rotate(double angleXZ, double angleYZ) Adds the specified angles to this rotation and updates the trigonometric values.- Parameters:
angleXZ- the angle to add around the XZ axis in radiansangleYZ- the angle to add around the YZ axis in radians
-