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 June 1, 1987 10:36:53 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, SVBasicTypes, SVModelTypes, SVSceneTypes;
Preprocess3d: CEDAR DEFINITIONS =
BEGIN
BoundBox: TYPE = SVBasicTypes.BoundBox;
BoundSphere: TYPE = SVBasicTypes.BoundSphere;
Camera: TYPE = SVModelTypes.Camera;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
CSGTree: TYPE = SVSceneTypes.CSGTree;
PreprocessForImage: PROC [tree: CSGTree, camera: Camera] RETURNS [bb: BoundBox, bs: BoundSphere];
Before doing anything with a SVRay tree, do this. Computes bounding spheres and bounding boxes as needed. Opens AIS files for use with texture mapping.
PreprocessForCatScan: 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.