File: Preprocess3d.mesa
Last edited by Bier on April 14, 1984 3:12:35 pm PST
Copyright © 1984 by Xerox Corporation. All rights reserved.
Author: Eric Bier before August 1, 1985 2:28:14 am PDT
Contents: File CSGImpl.mesa overflowed storage so I will put the preprocessing phases of ray casting in this interface. Preprocessing may include calculation transforms and their inverses, bounding boxes, unit rays in each instance coordinate system, and so forth.
DIRECTORY
Rope,
SVModelTypes,
SVRayTypes;
Preprocess3d: DEFINITIONS =
BEGIN
BoundBox: TYPE = SVModelTypes.BoundBox;
BoundSphere: TYPE = SVModelTypes.BoundSphere;
Camera: TYPE = SVModelTypes.Camera;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
CSGTree: TYPE = SVRayTypes.CSGTree;
PreprocessForImage: PROC [tree: CSGTree, camera: Camera] RETURNS [bb: BoundBox, bs: BoundSphere];
Before doing anything with a CSG tree, do this. Computes bounding spheres and bounding boxes as needed. Opens AIS files for use with texture mapping.
PreprocessForSlice: PROC [tree: CSGTree, camera: Camera] RETURNS [bs: BoundSphere];
Computes bounding spheres, but not bounding boxes. Opens no AIS files.
PreprocessForInteraction: PROC [tree: CSGTree, camera: Camera] RETURNS [bb: BoundBox];
Computes bounding boxes, but no bounding spheres. Opens no AIS files.
SetCurrentRayInPrimitives: PROC [node: REF ANY];
Do this before each row of ray casting
FindRayStepXInPrimitives: PROC [node: REF ANY];
Do this before casting any rays so that we only have to do it once. Sets up the csg structure so you can cast rays at them.
GetGlobalTable: PROC RETURNS [DisplayMap.ColorTable];
SetUpColorMap: PROC [tableName: Rope.ROPE];
END.