The Physiologist's Friend Simulation API

ch.unizh.ini.friend.graphics
Interface Transformable

All Superinterfaces:
Cloneable
All Known Subinterfaces:
BufferedTransform, Intersectable, SeparateTransforms
All Known Implementing Classes:
AbstractTransformable, ConcreteSeparateTransforms, ConvexPolygon, ShapeList, SynchronizedSeparateTransforms

public interface Transformable
extends Cloneable

Interface a transformable geometric object might implement. Whether the methods return this or a clone is up to the concrete implementation.

Version:
$Revision: 1.5 $
Author:
Christof Marti
See Also:
AbstractTransformable

Method Summary
 Transformable apply(AffineTransform at)
          Applies the given transformation to the geometric object.
 Object clone()
          Clones this geometric object.
 Transformable rotate(float phi)
          Rotates the geometric object by the given angle around the origin.
 Transformable rotate(float phi, float x, float y)
          Rotates the geometric object by the given angle around the given point.
 Transformable scale(float sx, float sy)
          Scales the geomtric object by the given values in x- and y-coordinates with the origin as center.
 Transformable scale(float sx, float sy, float x, float y)
          Scales the geomtric object by the given values in x- and y-coordinates with the given center (x, y).
 Transformable translate(float dx, float dy)
          Translates the geometric object by the given coordinates.
 

Method Detail

translate

Transformable translate(float dx,
                        float dy)
Translates the geometric object by the given coordinates.

Parameters:
dx - Translation in x-coordinates.
dy - Translation in y-coordinates.
Returns:
this for easy concatenation or a transformed clone.

rotate

Transformable rotate(float phi,
                     float x,
                     float y)
Rotates the geometric object by the given angle around the given point.

Parameters:
phi - Rotation angle.
x - x-coordinate of the rotation center.
y - y-coordinate of the rotation center.
Returns:
this for easy concatenation or a transformed clone.

rotate

Transformable rotate(float phi)
Rotates the geometric object by the given angle around the origin.

Parameters:
phi - Rotation angle.
Returns:
this for easy concatenation or a transformed clone.

scale

Transformable scale(float sx,
                    float sy,
                    float x,
                    float y)
Scales the geomtric object by the given values in x- and y-coordinates with the given center (x, y).

Parameters:
sx - Scalar for x-coordinates.
sy - Scalar for y-coordinates.
x - x-coordinate of the center.
y - y-coordinate of the center.
Returns:
this for easy concatenation or a transformed clone.

scale

Transformable scale(float sx,
                    float sy)
Scales the geomtric object by the given values in x- and y-coordinates with the origin as center.

Parameters:
sx - Scalar for x-coordinates.
sy - Scalar for y-coordinates.
Returns:
this for easy concatenation or a transformed clone.

apply

Transformable apply(AffineTransform at)
Applies the given transformation to the geometric object.

Parameters:
at - The affine transformation to apply.
Returns:
this for easy concatenation or a transformed clone.

clone

Object clone()
Clones this geometric object.

Returns:
The clone.

http://www.ini.unizh.ch/~tobi/friend