|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
ch.unizh.ini.friend.graphics.ShapeList
public class ShapeList
An ArrayList of shapes which are Transformable
and Intersectable
as a whole.
A GratingStimulus
(for example) is constructed by adding
a number of ConvexPolygons
to a ShapeList in
a ConcreteStimulus
.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
ShapeList()
Creates a new instance of ShapeList with an empty shape list. |
|
ShapeList(Transformable t)
creates a new ShapeList initialized with the given shape. |
Method Summary | |
---|---|
Transformable |
apply(AffineTransform at)
Applies the given transformation to the geometric object. |
float |
area()
Computes the total area of the shapes. |
Object |
clone()
clones this list of shapes, including cloning of the members of the list |
Intersectable |
intersect(Intersectable other)
Computes the area of intersection between this and the given other 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). |
String |
ShapeList()
string regpresentation of ShapeList |
Transformable |
translate(float dx,
float dy)
Translates the geometric object by the given coordinates. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public ShapeList()
public ShapeList(Transformable t)
t
- the starting shapeMethod Detail |
---|
public Transformable apply(AffineTransform at)
apply
in interface Transformable
at
- The affine transformation to apply.
public float area()
area
in interface Intersectable
public Intersectable intersect(Intersectable other)
this
and the given other
object.
intersect
in interface Intersectable
other
- The object to intersect with.
public Transformable rotate(float phi)
rotate
in interface Transformable
phi
- Rotation angle.
public Transformable rotate(float phi, float x, float y)
rotate
in interface Transformable
phi
- Rotation angle.x
- x-coordinate of the rotation center.y
- y-coordinate of the rotation center.
public Transformable scale(float sx, float sy)
scale
in interface Transformable
sx
- Scalar for x-coordinates.sy
- Scalar for y-coordinates.
public Transformable scale(float sx, float sy, float x, float y)
scale
in interface Transformable
sx
- Scalar for x-coordinates.sy
- Scalar for y-coordinates.x
- x-coordinate of the center.y
- y-coordinate of the center.
public Transformable translate(float dx, float dy)
translate
in interface Transformable
dx
- Translation in x-coordinates.dy
- Translation in y-coordinates.
public String ShapeList()
public Object clone()
clone
in interface Transformable
clone
in class ArrayList
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |