Animation3D.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Last Edited by: Crow, December 4, 1987 5:30:11 pm PST
DIRECTORY
Rope    USING [ ROPE ],
ThreeDBasics  USING [ Context, Pair, ShapeInstance, ShapeProc, Triple, TripleSequence ];
Animation3D: CEDAR DEFINITIONS
~ BEGIN
Basic Types
Context: TYPE ~ ThreeDBasics.Context;
Pair: TYPE ~ ThreeDBasics.Pair;
Triple: TYPE ~ ThreeDBasics.Triple;       -- RECORD [ x, y, z: REAL];
TripleSequence: TYPE ~ ThreeDBasics.TripleSequence;
ShapeInstance: TYPE ~ ThreeDBasics.ShapeInstance;
ViewProc: TYPE ~ PROC[context: REF Context, lookingFrom, lookingAt: Triple, frameNo: NAT];
Procedures for Eyepoint-Ctr of Interest Trajectories
These generate a sequence of positions to drive animations
MoveEyePointInOrbit: PROC[ context: REF Context, eyePt, lookingAt, axis, base: Triple,
          displayProc: ViewProc,
         framesPerRev: NAT, startAt, endAt: NAT ← 0 ];
MoveCtrOfInterestInOrbit: PROC[ context: REF Context, eyePt, lookingAt, axis, base: Triple,
           displayProc: ViewProc,
          framesPerRev: NAT, startAt, endAt: NAT ← 0 ];
MoveOnLine: PROC[ context: REF Context, eyePt, lookingAt, toEyePt, toLookingAt: Triple,
       displayProc: ViewProc, framesOnLine: NAT, startAt, endAt: NAT ← 0 ];
MoveOnOpenCurve: PROC[ context: REF Context, eyePts, lookingAts: REF TripleSequence,
         displayProc: ViewProc,
         framesOnCurve: NAT, startAt, endAt: NAT ← 0 ];
MoveOnClosedCurve: PROC[ context: REF Context, eyePts, lookingAts: REF TripleSequence,
         displayProc: ViewProc,
         framesOnCurve: NAT, startAt, endAt: NAT ← 0 ];
Procedures for Viewing Trajectories
ShowOpenCurve: PROC[ context: Context, eyePts, lookingAts: REF TripleSequence,
        numFrames: NAT, startAt: NAT ← 0 ];
ShowClosedCurve: PROC[ context: Context, eyePts, lookingAts: REF TripleSequence,
        numFrames: NAT, startAt: NAT ← 0 ];
ShowOrbit: PROC[ context: Context, startPt, axis, base: Triple, framesPerRev: NAT ];
Adds description of path to data for current scene, will be displayed just like any other shape. "Trajectory" is name given to resulting ShapeInstance.
Procedures for Texture Animation
SetTxtrTranslation: PROC[ context: REF Context, shapeName: Rope.ROPE,
        translation: Pair, frames: NAT ];
Sets up translation by [translation.x, translation.y] over "frames" frames
Procedures for Shape Interpolation
SetShapeInterpolation: PUBLIC PROC[ context: REF Context, shapeName: Rope.ROPE,
            begin, end: REF ShapeInstance, frames: NAT ];
Sets up interpolation between "begin" shape and "end" shape, over "frames" frames
Procedures for Registering Shape Manipulation Procedures for Animation
SetShapeManipulation: PUBLIC PROC[ context: REF Context, shapeName: Rope.ROPE,
            prop, propVal: REF ANY,
            proc: ThreeDBasics.ShapeProc ];
Way of registering single procedure to be called to modify shape before each frame, clears away any previous list of procedures
AddShapeManipulation: PUBLIC PROC[ context: REF Context, shapeName: Rope.ROPE,
            prop, propVal: REF ANY,
            proc: ThreeDBasics.ShapeProc ];
Way of registering additional procedure to be called to modify shape before each frame
END.