org.grinvin.gred
Interface Transformation
- 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.
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.
x - X-coordinate in destination spacey - Y-coordinate in destination spaceresult - 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.
src - Coordinates in the n-dimensindest - Array into which the resulting coordinates shall be stored