Package org.opensourcephysics.numerics
Interface Transformation
- All Superinterfaces:
Cloneable
- All Known Subinterfaces:
MatrixTransformation
- All Known Implementing Classes:
Matrix2DTransformation
,Matrix3DTransformation
,Quaternion
Transformation maps coordinates from one coordinate system to another.
-
Method Summary
-
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
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
-