org.opensourcephysics.numerics
Interface Transformation

All Superinterfaces:
java.lang.Cloneable
All Known Subinterfaces:
MatrixTransformation
All Known Implementing Classes:
AxisRotation, CustomAxisRotation, FunnyTransformation, Matrix2DTransformation, Matrix3DTransformation, Matrix3DTransformation, Quaternion, QuaternionRotation, QuaternionRotation, RotationAroundAxis, TransformationComposition, XAxisRotation, YAxisRotation, ZAxisRotation

public interface Transformation
extends java.lang.Cloneable

Transformation maps coordinates from one coordinate system to another.


Method Summary
 java.lang.Object clone()
          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 Detail

clone

java.lang.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 java.lang.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:
java.lang.UnsupportedOperationException - If the transformation is not invertible