Class Transform

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

public class Transform extends Object implements Cloneable
Represents a transformation in 3D space combining translation and rotation.

Transformations are applied in order: rotation first, then translation.

See Also:
  • Constructor Details

    • Transform

      public Transform()
    • Transform

      public Transform(Point3D translation)
      Creates a transform with the specified translation and no rotation.
      Parameters:
      translation - the translation
    • Transform

      public Transform(Point3D translation, double angleXZ, double angleYZ)
      Creates a transform with the specified translation and rotation angles.
      Parameters:
      translation - the translation
      angleXZ - the angle around the XZ axis (yaw) in radians
      angleYZ - the angle around the YZ axis (pitch) in radians
    • Transform

      public Transform(Point3D translation, Rotation rotation)
      Creates a transform with the specified translation and rotation.
      Parameters:
      translation - the translation
      rotation - the rotation
  • Method Details

    • clone

      public Transform clone()
      Overrides:
      clone in class Object
    • getRotation

      public Rotation getRotation()
    • getTranslation

      public Point3D getTranslation()
    • transform

      public void transform(Point3D point)
      Applies this transform to a point: rotation followed by translation.
      Parameters:
      point - the point to transform (modified in place)