DIRECTORY Imager, SV2d, SV3d, SVModelTypes, SVSceneTypes; SVCatScan: CEDAR DEFINITIONS = BEGIN Camera: TYPE = SVModelTypes.Camera; Classification: TYPE = SVSceneTypes.Classification; CoordSystem: TYPE = SVModelTypes.CoordSystem; CSGTree: TYPE = SVSceneTypes.CSGTree; FrameBlock: TYPE = SVSceneTypes.FrameBlock; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = SV3d.Point3d; Ray: TYPE = SVSceneTypes.Ray; CatScanScanLine: TYPE = REF CatScanScanLineObj; CatScanScanLineObj: TYPE = RECORD [ lineVal: REAL, hits: ARRAY [1..SVSceneTypes.maxSceneDepth] OF Point3d, classifs: ARRAY [1..SVSceneTypes.maxSceneDepth] OF BOOL, count: NAT]; CatScan: TYPE = REF CatScanObj; CatScanObj: TYPE = RECORD [ coordSys: CoordSystem, frame: FrameBlock, plane: NAT, seq: SEQUENCE maxScans: NAT OF CatScanScanLine]; CreateCatScan: PROC [maxScans: NAT, coordSys: CoordSystem, frame: FrameBlock, plane: NAT] RETURNS [catScan: CatScan]; UpdateCatScan: PROC [catScan: CatScan, coordSys: CoordSystem, frame: FrameBlock, plane: NAT]; ChangeCatScanPlane: PROC [catScan: CatScan, plane: NAT]; RayTraceTheCatScan: PROC [catScan: CatScan, tree: CSGTree, camera: Camera]; WidthAndHeight: PROC [catScan: CatScan] RETURNS [width, height: REAL]; DrawCatScan: PROC [dc: Imager.Context, catScan: CatScan, origin: Point2d]; DrawCatScan3d: PROC [dc: Imager.Context, catScan: CatScan, camera: Camera]; END. pFile: SVCatScan.mesa Last edited by: Eric Bier on June 1, 1987 1:31:14 pm PDT Copyright c 1984 by Xerox Corporation. All rights reserved. Contents: A scanline data structure representing a ray-traced catScan thru a 3D scene. Can be shown in 3D by drawing the endpoints in perspective or in 2D by rotating the slicing plane into the viewing plane. Uses the dimensions of the framebox and the current plane to determine the size of the rectangle this catScan will project to in the chosen plane. Draw the catScan in a 2d window such as the scratchpad. Draw the outline of the catScan in with a set of solid objects. Κφ˜Ihead™J™8Jšœ Οmœ1™