DIRECTORY Rope, G3dRender, ImagerPixel; G3dAnimationSupport: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Context: TYPE ~ G3dRender.Context; Pair: TYPE ~ G3dRender.Pair; Triple: TYPE ~ G3dRender.Triple; -- RECORD [ x, y, z: REAL]; TripleSequence: TYPE ~ G3dRender.TripleSequence; Shape: TYPE ~ G3dRender.Shape; PixelMap: TYPE ~ ImagerPixel.PixelMap; ViewProc: TYPE ~ PROC[context: Context, lookingFrom, lookingAt: Triple, frameNo: NAT]; FrameSequence: TYPE ~ RECORD[ currentFrame: NAT _ 0, length: NAT, labels: BOOLEAN _ FALSE, frames: SEQUENCE maxLength: NAT OF PixelMap ]; ShowAISCacheFrame: PROC[context: Context, frames: REF FrameSequence]; PlayBackNumberedAISFiles: PROC[context: Context, fileRoot : ROPE, startNum, numFiles, framesPerSec, secondsPlayingTime : NAT]; CacheAISFiles: PROC[context: Context, fileOfNames: ROPE, labeled: BOOL _ FALSE] RETURNS[REF FrameSequence]; CacheNumberedAISFiles: PROC[context: Context, fileRoot: ROPE, numFiles: NAT, start: NAT _ 0, labeled: BOOL _ FALSE] RETURNS[REF FrameSequence]; PlayBackAISCache: PROC[context: Context, frames: REF FrameSequence, framesPerSec, secondsPlayingTime: NAT, bothWays: BOOLEAN _ FALSE, startNum: NAT _ 0]; ShowNextAISCacheFrame: PROC[context: Context, frames: REF FrameSequence, framesPerSec: INTEGER _ 0]; Orbit: PROC [context: Context, lookingFrom, lookingAt, axis, base: Triple, moveEPNotCI: BOOLEAN _ TRUE, framesPerRev: NAT _ 16, startAt: NAT _ 0, endAt: NAT _ 32767, filename: Rope.ROPE _ NIL ]; MakeFramesFromTo: PROC [context: Context, lookingFrom, lookingAt, toLookingFrom, toLookingAt: Triple, framesOnLine: NAT, startAt, endAt: NAT _ 0, filename: Rope.ROPE _ NIL ]; MakeFramesOnPath: PROC [context: Context, lookingFrom, lookingAt: LIST OF Triple, framesOnPath: NAT, startAt, endAt: NAT _ 0, filename: Rope.ROPE _ NIL, closed: BOOLEAN _ TRUE ]; MoveEyePointInOrbit: PROC[ context: Context, eyePt, lookingAt, axis, base: Triple, displayProc: ViewProc, framesPerRev: NAT, startAt, endAt: NAT _ 0 ]; MoveCtrOfInterestInOrbit: PROC[ context: Context, eyePt, lookingAt, axis, base: Triple, displayProc: ViewProc, framesPerRev: NAT, startAt, endAt: NAT _ 0 ]; MoveOnLine: PROC[ context: Context, eyePt, lookingAt, toEyePt, toLookingAt: Triple, displayProc: ViewProc, framesOnLine: NAT, startAt, endAt: NAT _ 0 ]; MoveOnOpenCurve: PROC[ context: Context, eyePts, lookingAts: TripleSequence, displayProc: ViewProc, framesOnCurve: NAT, startAt, endAt: NAT _ 0 ]; MoveOnClosedCurve: PROC[ context: Context, eyePts, lookingAts: TripleSequence, displayProc: ViewProc, framesOnCurve: NAT, startAt, endAt: NAT _ 0 ]; ShowOpenCurve: PROC[ context: Context, eyePts, lookingAts: TripleSequence, numFrames: NAT, startAt: NAT _ 0 ]; ShowClosedCurve: PROC[ context: Context, eyePts, lookingAts: TripleSequence, numFrames: NAT, startAt: NAT _ 0 ]; ShowOrbit: PROC[ context: Context, startPt, axis, base: Triple, framesPerRev: NAT ]; SetTxtrTranslation: PROC[ context: Context, shapeName: Rope.ROPE, translation: Pair, frames: NAT ]; SetShapeInterpolation: PUBLIC PROC[ context: Context, shapeName: Rope.ROPE, begin, end: REF Shape, frames: NAT ]; SetShapeManipulation: PUBLIC PROC[ context: Context, shapeName: Rope.ROPE, prop, propVal: REF ANY, proc: G3dRender.ShapeProc ]; AddShapeManipulation: PUBLIC PROC[ context: Context, shapeName: Rope.ROPE, prop, propVal: REF ANY, proc: G3dRender.ShapeProc ]; END. ‚G3dAnimationSupport.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Last Edited by: Crow, April 21, 1989 11:38:16 am PDT Basic Types Procedures for Storage and Playback of Image Sequences from Files Shows the specified frame from a frame sequence cached in VM Plays back a sequenced set of AIS files, cycling through the files ad nauseum - startNum specifies the first image in the sequence to display - numFiles specifies the number of different images to be displayed - framesPerSec ranges from 1 up to 30 (performance is limited by bitblt speed) - secondsPlayingTime limits the running time Stores image on display in named file(s), non-defaulted sequence number is added to file name Stores a cache of images, named in a file of ROPEs, in memory for playback. Returns a handle to the cache Stores a cache of images, with sequentially numbered file names, in memory for flexible playback. Returns a handle to the cache. File names of the form: name0.ais, name1.ais, name64.ais, etc. Start indicates file name to begin sequence with. Plays back a cached set of images as above, will cycle through the sequence or run back and forth over the sequence if bothWays is set TRUE, the playback may be started in midsequence if startNum is nonzero Shows next frame in sequence, delaying enough time to ensure framesPerSec not exceeded, handy for interactive control of frame rate, negative framesPerSec shows previous frame Procedures for Making Simple Animations These generate a sequence of frames with options to store to files Calculate elliptical orbit about center of interest (or eyepoint if moveEPNotCI is FALSE), write images to series of numbered files if filename # NIL Calculate and display (if a displayed context) frames along a straightline path Calculate and display (if a displayed context) frames along a cubic path through control points Procedures for Eyepoint-Ctr of Interest Trajectories These generate a sequence of positions to drive animations Procedures for Viewing Trajectories Adds description of path to data for current scene, will be displayed just like any other shape. "Trajectory" is name given to resulting Shape. Procedures for Texture Animation Sets up translation by [translation.x, translation.y] over "frames" frames Procedures for Shape Interpolation Sets up interpolation between "begin" shape and "end" shape, over "frames" frames Procedures for Registering Shape Manipulation Procedures for Animation Way of registering single procedure to be called to modify shape before each frame, clears away any previous list of procedures Way of registering additional procedure to be called to modify shape before each frame Ê2˜Iheadšœ™šœ Ïmœ1™