Class Orientation

java.lang.Object
eu.svjatoslav.sixth.e3d.math.Orientation
All Implemented Interfaces:
Cloneable

public class Orientation extends Object implements Cloneable
Used to represent orientation in a 3D space. Orientations are represented as two angles of rotation around the XZ and YZ axes. The angles are stored as sines and cosines to avoid unnecessary trigonometric calculations. Orientations are used for rotating object coordinates in a 3D space.
  • Constructor Details

    • Orientation

      public Orientation()
    • Orientation

      public Orientation(double angleXZ, double angleYZ)
      Creates a new orientation with the specified angles.
      Parameters:
      angleXZ - The angle of rotation around the XZ axis.
      angleYZ - The angle of rotation around the YZ axis.
  • Method Details

    • clone

      public Orientation clone()
      Overrides:
      clone in class Object
    • rotate

      public void rotate(Point3D point3d)
      Rotates the specified point around the XZ and YZ axes relative to the origin.
      Parameters:
      point3d - The point to rotate.
    • rotate

      public void rotate(double angleXZ, double angleYZ)
      Rotates current orientation around the XZ and YZ axes.