MultiTrack

This behaviour moves a point along a track, but ensures that the point does not get closer than some, configurable, distance from some other point. The object animated by a MultiTrack can be made to avoid another object by animating the avoided point with the same behaviour as that moving the object to be avoided.

Features

XML Element XML Type Java Class Activity
behaviour track uk.ac.ic.doc.scenebeans.behaviour.Track finite

Properties

Name Type Default Value Getter Method Setter Method Description
avoid java.awt.geom. Point2D (0,0) getAvoid setAvoid The point to be avoided. The behaviour will not move closer than the spacing property from this point.
spacing double 0 getSpacing setSpacing The behaviour will not move closer than the spacing property from the avoid point.
pointCount int 0 getPointCount setPointCount The number of points in the track. The value of this property must be three or more.
points Point2D []
(indexed)
(0,0) getPoints setPoints The points of the track.
x double []
(indexed)
0 getX setX The x coordinates of the points of the track.
y double []
(indexed)
0 getY setY The x coordinates of the points of the track.
duration double []
(indexed)
1 getDuration setDuration The duration of each leg of the track. If there are n points in the track, there are (n-1) durations. Duration m is the time taken to move from point m to point (m+1).
event String []
(indexed)
null getEvent setEvent The name of the AnimationEvent announced when the behaviour reaches each point. If there are n points in the track, there are (n-1) events. Event m is announced when the behaviour reaches point (m+1). If an event is null it is not announced.
value java.awt.geom. Point2D (0,0) getValue read only The current value of the behaviour.
activityName double 0.0 getActivityName setActivityName The name of the behaviour, as announced in AnimationEvents when the behaviour completes. In XML documents, this property is usually specified by the name attribute of the <behaviour> element.
finite boolean false isFinite read only Returns whether the activity is finite. It is, so this always returns true.

Behaviour Facets

Name Behaviour Type Getter Method Description
n/a java.awt.geom. Point2D n/a This behaviour is not facetted.