G3dAnimate.mesa
Copyright Ó 1985, 1992 by Xerox Corporation. All rights reserved.
Bloomenthal, July 15, 1992 11:32 pm PDT
DIRECTORY Rope;
G3dAnimate: CEDAR DEFINITIONS
~ BEGIN
This interface provides for the synchronization of remote computation of frames within an animation.
Types
ROPE: TYPE ~ Rope.ROPE;
Errors
Error: SIGNAL [code: ATOM, reason: ROPE];
Animation Control
GetFrameNumber: PROC [masterMachineName, animationName: ROPE] RETURNS [INTEGER];
Return a number for a frame that needs computing as part of the given animation.
masterMachineName is the name of the machine that is synchronizing the animation.
-1 is returned if no more frames need computing.
Can raise Error[$NoSuchAnimation].
FrameDone: PROC [masterMachineName, animationName: ROPE, frame: NAT];
Indicate that the given frame has been completed.
This call must be made by the remote machine when it has completed the frame;
otherwise the frame may be given to another machine for computation.
masterMachineName is the name of the machine that is synchronizing the animation.
Can raise Error[$BadFrame] if frame is beyond the number of frames in the animation.
RegisterAnimation: PROC [name: ROPE, nFrames, estMinutesPerFrame: NAT];
Register the named animation with the present computer.
The present computer becomes the masterMachine for the named animation.
estMinutesPerFrame is the estimated time in minutes that each frame of the animation needs.
Those machines that have begun to compute a frame have approximately twice
estMinutesPerFrame to complete the frame and call FrameDone;
otherwise, the frame may be given to another machine for computation.
UnRegisterAnimation: PROC [name: ROPE];
Remove the named animation from the last of active animations.
END.