File: SVPreprocess3d.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 September 24, 1987 12:20:17 pm 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, SV3d, SVBasicTypes, SVModelTypes, SVSceneTypes;
SVPreprocess3d: CEDAR DEFINITIONS =
BEGIN
BoundBox: TYPE = SVBasicTypes.BoundBox;
Sphere: TYPE = SV3d.Sphere;
Camera: TYPE = SVModelTypes.Camera;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
CSGTree: TYPE = SVSceneTypes.CSGTree;
PreprocessForImage: PROC [tree: CSGTree, camera: Camera] RETURNS [bb: BoundBox, bs: Sphere];
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: Sphere];
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.