Interface Transformation

All Superinterfaces:
Cloneable
All Known Subinterfaces:
MatrixTransformation
All Known Implementing Classes:
Matrix2DTransformation, Matrix3DTransformation, Quaternion

public interface Transformation extends Cloneable
Transformation maps coordinates from one coordinate system to another.
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides a copy of this transformation.
    double[]
    direct(double[] point)
    Transforms a given point
    double[]
    inverse(double[] point)
    The inverse transformation (if it exists).
  • Method Details

    • clone

      Object clone()
      Provides a copy of this transformation. This is used by an OSP 3D Element that will explicitely get a clone of it whenever its setTransformation() method is invoked. Thus, changing the original transformation directly has no effect unless a new setTransformation is invoked.
    • direct

      double[] direct(double[] point)
      Transforms a given point
      Parameters:
      point - double[] the coordinates to be transformed (the array's contents will be changed accordingly)
      Returns:
      double[] the transformed vector (i.e. point)
    • inverse

      double[] inverse(double[] point) throws UnsupportedOperationException
      The inverse transformation (if it exists). If the transformation is not invertible, then a call to this method must throw a UnsupportedOperationException exception.
      Parameters:
      point - double[] the coordinates to be transformed (the array's contents will be changed accordingly)
      Returns:
      double[] the transformed vector (i.e. point)
      Throws:
      UnsupportedOperationException - If the transformation is not invertible