File: SVDraw3d.mesa
Last edited by Bier on December 18, 1982 1:19 am
Author: Eric Bier on July 8, 1987 5:55:37 pm PDT
Contents: Some useful combinations of Imager operations
DIRECTORY
Imager, SV2d, SV3d, SVModelTypes, SVSceneTypes;
SVDraw3d: CEDAR DEFINITIONS =
BEGIN
Camera: TYPE = SVModelTypes.Camera;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
CSGTree: TYPE = SVSceneTypes.CSGTree;
Matrix4by4: TYPE = SV3d.Matrix4by4;
Point2d: TYPE = SV2d.Point2d;
Point3d: TYPE = SV3d.Point3d;
SelectionClass: TYPE = SVSceneTypes.SelectionClass;
Vector3d: TYPE = SV3d.Vector3d;
DrawCoordSys: PROC [dc: Imager.Context, csCAMERA: Matrix4by4, camera: Camera];
DrawSkitter: PROC [dc: Imager.Context, csCAMERA: Matrix4by4, camera: Camera];
DrawTargetCoordSys: PROC [dc: Imager.Context, csCAMERA: Matrix4by4, camera: Camera];
DrawJack: PROC [dc: Imager.Context, cs: CoordSystem, camera: Camera];
DrawMovee: PROC [dc: Imager.Context, cs: CoordSystem, camera: Camera];
DrawPlaneSelection: PROC [dc: Imager.Context, cs: CoordSystem, planeNum: NAT, camera: Camera];
DrawXPlane:
PROC [dc: Imager.Context, left, right, down, up:
REAL, cs: CoordSystem, camera: Camera];
Draw the square bounded by left, right, down, and up (left-right = z, down-up = y) in the x = 0 plane of cs.
DrawYPlane:
PROC [dc: Imager.Context, left, right, down, up:
REAL, cs: CoordSystem, camera: Camera];
Draw the square bounded by left, right, down, and up (left-right = x, down-up = z) in the y = 0 plane of cs.
DrawZPlane:
PROC [dc: Imager.Context, left, right, down, up:
REAL, cs: CoordSystem, camera: Camera];
Draw the square bounded by left, right, down, and up (left-right = x, down-up = y) in the z = 0 plane of cs.
DrawVector: PROC [dc: Imager.Context, v: Vector3d, origin: Point3d, camera: Camera]; -- assumes v is in camera coords.
DrawLocalVector: PROC [dc: Imager.Context, v: Vector3d, origin: Point3d, camera: Camera, localCS: CoordSystem]; -- assumes v and origin are in localCS coords.
Draw2dCoordSys: PROC [dc: Imager.Context, origin: Point2d, camera: Camera];
DrawX: PROC [dc: Imager.Context, point: Point2d, camera: Camera];
DrawSelectedJoint: PROC [dc: Imager.Context, worldPt: Point3d, camera: Camera, selectClass: SelectionClass];
DrawCP: PROC [dc: Imager.Context, worldPt: Point3d, camera: Camera];
DrawBoundBoxes: PROC [dc: Imager.Context, tree: CSGTree, camera: Camera];
DrawBoundBox: PROC [dc: Imager.Context, node: REF ANY, camera: Camera, xor: BOOL];
DrawBoundSpheres: PROC [dc: Imager.Context, tree: CSGTree, camera: Camera];
DrawTransformedShape:
PROC [dc: Imager.Context, cs
CAMERA: Matrix4by4, camera: Camera, path: Imager.PathProc];
Any two dimensional shape that can be drawn with the Imager, can be drawn as though its sheet of paper has been embedded in 3-space, rotated, scaled, and translated by csCAMERA. This procedure only works for the orthogonal projection.
END.