-- File: SVTransforms.mesa
-- Last edited by Bier on December 18, 1982 1:18 am
-- Author: Eric Bier on January 12, 1983 3:12 pm
-- Contents: Procedures for Scaling, Translating, and Rotating assemblies with respect to an arbitrary coordinate system

DIRECTORY
 CSGGraphics,
 CoordSys,
 DisplayList3d,
 Matrix3d;

SVTransforms: DEFINITIONS =
BEGIN


Assembly: TYPE = DisplayList3d.Assembly;
Camera: TYPE = CSGGraphics.Camera;
CoordSystem: TYPE = CoordSys.CoordSystem;
Matrix4by4: TYPE = Matrix3d.Matrix4by4;
Scene: TYPE = DisplayList3d.Scene;

TellAboutCameraAndWorld: PROC [a: Assembly, camera: Camera, scene: Scene];

ScalePrimitive: PROC [a: Assembly, sx, sy, sz: REAL];
ScalePrimitives: PROC [a: Assembly, sx, sy, sz: REAL];
ScaleEven: PROC [a: Assembly, cs: CoordSystem, scalar: REAL];
ScaleAndShear: PROC [a: Assembly, cs: CoordSystem, sx, sy, sz: REAL];
ScaleNoShear: PROC [a: Assembly, cs: CoordSystem, sx, sy, sz: REAL];
Scale: PROC [a: Assembly, cs: CoordSystem, sx, sy, sz: REAL];

Translate: PROC [a: Assembly, cs: CoordSystem, tx, ty, tz: REAL];
XRotate: PROC [a: Assembly, cs: CoordSystem, degrees: REAL];
YRotate: PROC [a: Assembly, cs: CoordSystem, degrees: REAL];
ZRotate: PROC [a: Assembly, cs: CoordSystem, degrees: REAL];
Align: PROC [a: Assembly, cs: CoordSystem];
Abut: PROC [a: Assembly, cs: CoordSystem];
AbutX: PROC [a: Assembly, cs: CoordSystem];
AbutY: PROC [a: Assembly, cs: CoordSystem];
AbutZ: PROC [a: Assembly, cs: CoordSystem];
Place: PROC [a: Assembly, cs: CoordSystem, mat: Matrix4by4];

-- The three procs below are like their lookalikes above. The difference is one level of indirection. AbutIndirect doesn't put assembly's coordSys on top of dock. Instead, it puts tugBoat on top of dock, where the relationship between a and tugBoat remains constant.

AlignIndirect: PROC [a: Assembly, tugBoat: CoordSystem, dock: CoordSystem];
AbutIndirect: PROC [a: Assembly, tugBoat: CoordSystem, dock: CoordSystem];
PlaceIndirect: PROC [a: Assembly, tugBoat: CoordSystem, dock: CoordSystem, mat: Matrix4by4];

END.