<> <> <> <> DIRECTORY CoordSys, CSG, DisplayList3d, Graphics, GraphicsColor, IO, Matrix3d, Rope, Shading, SV2d, SVBoundBox, SVVector3d; CastRays: DEFINITIONS = BEGIN BoundBox: TYPE = REF BoundBoxObj; BoundBoxObj: TYPE = SVBoundBox.BoundBoxObj; Camera: TYPE = DisplayList3d.Camera; Color: TYPE = GraphicsColor.Color; CoordSystem: TYPE = REF CoordSysObj; CoordSysObj: TYPE = CoordSys.CoordSysObj; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = Matrix3d.Point3d; Vector: TYPE = SVVector3d.Vector; Surface: TYPE = CSG.Surface; -- REF ANY; CSGTree: TYPE = REF CSGTreeObj; CSGTreeObj: TYPE = CSG.CSGTreeObj; <> PointSetOp: TYPE = CSG.PointSetOp; <<{union, intersection, difference}>> ParameterArray: TYPE = CSG.ParameterArray; -- ARRAY [1..maxSceneDepth] OF REAL; SurfaceArray: TYPE = REF SurfaceArrayObj; SurfaceArrayObj: TYPE = CSG.SurfaceArrayObj; <> InOutArray: TYPE = CSG.InOutArray; -- ARRAY [1..maxSceneDepth] OF BOOL; NormalArray: TYPE = CSG.NormalArray; -- ARRAY [1..maxSceneDepth] OF Vector; PrimitiveArray: TYPE = CSG.PrimitiveArray; -- ARRAY [1..maxSurfacesPerObject] OF Primitive; Ray: TYPE = REF RayObj; RayObj: TYPE = CSG.RayObj; Classification: TYPE = REF ClassificationObj; ClassificationObj: TYPE = CSG.ClassificationObj; LightSourceList: TYPE = Shading.LightSourceList; RayCast: PROC [cameraPoint: Point2d, sceneRay: Ray, node: REF ANY, makeStream: BOOL _ FALSE, f: IO.STREAM _ NIL, indent: NAT _ 0] RETURNS [class: Classification]; <> RayCastNoBBoxes: PROC [sceneRay: Ray, node: REF ANY, makeStream: BOOL _ FALSE, f: IO.STREAM _ NIL, indent: NAT _ 0] RETURNS [class: Classification]; <> HitsTree: PROC [worldRay: Ray, tree: CSGTree] RETURNS [BOOL]; FirstHit: PROC [worldRay: Ray, tree: CSGTree, makeStream: BOOL _ FALSE, f: IO.STREAM _ NIL, indent: NAT _ 0] RETURNS [hits: BOOL, t: REAL]; Combine: PROC [leftClass, rightClass: Classification, op: PointSetOp] RETURNS [combinedClass: Classification]; SingleRay: PROC [x, y: INTEGER, tree: CSGTree, lightSources: LightSourceList, camera: Camera, makeStream: BOOL _ FALSE, f: IO.STREAM _ NIL] RETURNS [color: Color]; SingleRay2: PROC [cameraPoint: Point2d, tree: CSGTree, lightSources: LightSourceList, camera: Camera, makeStream: BOOL _ FALSE, f: IO.STREAM _ NIL] RETURNS [class: Classification]; <> <<>> SetScanSize: PROC [height, width: NAT]; DrawTree: PROC [dc: Graphics.Context, tree: CSGTree, lightSources: LightSourceList, camera: Camera, aisRope: Rope.ROPE, bAndWOnly: BOOL, notify: NotifyOfProgressProc _ NoOpNotifyOfProgress, clientData: REF ANY _ NIL, outStream: IO.STREAM] RETURNS [success: BOOL]; <> NotifyOfProgressProc: TYPE = PROC [currentY, minX, minY, maxX, maxY: REAL, clientData: REF ANY _ NIL]; NoOpNotifyOfProgress: NotifyOfProgressProc; Text: TYPE = REF READONLY TEXT; GetClassFromPool: PROC RETURNS [class: Classification]; ReturnClassToPool: PROC [class: Classification]; MakeClassAMiss: PROC [class: Classification]; <> GetRayFromPool: PROC RETURNS [ray: Ray]; ReturnRayToPool: PROC [ray: Ray]; END.