org.grinvin.gred

Interface Transformation

Known Implementing Classes:
AbstractTransformation, AffineTransformation, OrthogonalProjection

public interface Transformation

Coordinate transformation from n-dimensional real coordinates (in source space) to 2-dimensional real coordinates (in destination space).

Additionally functions as a model in a model-view-controller triple.

Method Summary

void
addTransformationListener(TransformationListener l)
Register a transformation listener with this model.
int
getDimension()
Return the dimension of the source space.
void
inverseTransform(double x, double y, double[] result)
Perform an inverse transformation from destination space back to source space.
boolean
isInvertible()
Is this transformation invertible?
void
removeTransformationListener(TransformationListener l)
Unregister a previously registered transformation listener.
double[]
transform(double[] src, double[] dest)
Transform the given set of coordinates from source space to destination space.

Method Details

addTransformationListener

public void addTransformationListener(TransformationListener l)
Register a transformation listener with this model.

getDimension

public int getDimension()
Return the dimension of the source space.

inverseTransform

public void inverseTransform(double x,
                             double y,
                             double[] result)
            throws IllegalStateException
Perform an inverse transformation from destination space back to source space.

This implementation throws an exception.

Parameters:
x - X-coordinate in destination space
y - Y-coordinate in destination space
result - Array into which the resulting source space coordinates should be stored

isInvertible

public boolean isInvertible()
Is this transformation invertible?

removeTransformationListener

public void removeTransformationListener(TransformationListener l)
Unregister a previously registered transformation listener.

transform

public double[] transform(double[] src,
                          double[] dest)
Transform the given set of coordinates from source space to destination space.
Parameters:
src - Coordinates in the n-dimensin
dest - Array into which the resulting coordinates shall be stored
Returns:
a reference to dest.