Interface Rotatable

All Known Implementing Classes:
Camera, DirectionalLight, Point3d, PointLight, Shape3d, Triangle

public interface Rotatable
This interface allows objects in 3D space to be rotated.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    rotate(int axis, double theta, Point3d point)
    Rotates this object about a given point on a specified axis.
  • Method Details

    • rotate

      void rotate(int axis, double theta, Point3d point)
      Rotates this object about a given point on a specified axis. 0 corresponds to the X axis, 1 corresponds to the Y axis, and 2 corresponds to the Z axis.
      Parameters:
      axis - the axis to rotate around
      theta - the radians to rotate by
      point - the center point to rotate around