class AnimObject {
public:
AnimObject(const AnimObject&);
void Originate(int);
void Delete(int);
int Program(int, Action*);
virtual Loc *Where(PART);
};
All AnimObjects (except the special Set object) have four fields in common:
an associated View, their visibility, and x and y locations. These are
the four parameters to the AnimObject constructor. Each subclass constructor
must call this superclass constructor. All AnimObjects have their own ``copy''
constructors and destructors too. Note that when an AnimObject is constructed,
it does not appear in an animation View automatically. The user must call
the Originate routine to have the AnimObject appear. The parameter to Originate
will specify at which animation frame number the object will appear. To
remove an AnimObject from a View permanently, call the Delete routine and
specify at which frame it should be removed. It is also possible to change
the appearance of an object, from say a Line to a Rectangle, with the Change
function. All AnimObjects are programmed to perform an Action (see below)
through the superclass function Program. Objects retain their programming
across Change calls. The Where operation returns the current location of
a part of the object.
AnimObjects are designed (actually ``will eventually be designed'') to be user-extensible. That is, an animation designer should be able to add her/his own new subclass. For convenience, we provide a large collection of subclasses types. Each constructor allocates a graphical image and returns a handle to it.