DIRECTORY GraphicsColor, Rope, SV2d, SV3d, SVModelTypes; SVRayTypes: DEFINITIONS = BEGIN Artwork: TYPE = SVModelTypes.Artwork; BoundBox: TYPE = SVModelTypes.BoundBox; BoundHedron: TYPE = SVModelTypes.BoundHedron; BoundSphere: TYPE = SVModelTypes.BoundSphere; Color: TYPE = GraphicsColor.Color; CoordSystem: TYPE = SVModelTypes.CoordSystem; Matrix4by4: TYPE = SV3d.Matrix4by4; Point2d: TYPE = SV2d.Point2d; Vector: TYPE = SV3d.Vector; RayCastProc: TYPE = PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; RayCastNoBBoxesProc: TYPE = PROC [localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; RayCastBoundingSpheresProc: TYPE = PROC [localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; Surface: TYPE = REF ANY; -- may be RectSurface, TubeSurface, DiskSurface, ShellSurface... Classification: TYPE = REF ClassificationObj; ClassificationObj: TYPE = RECORD [ count: NAT, params: ParameterArray, surfaces: SurfaceArray, primitives: PrimitiveArray,-- the primitive from which each surface came classifs: InOutArray, normals: NormalArray]; maxSceneDepth: NAT = 40; ParameterArray: TYPE = ARRAY [1..maxSceneDepth] OF REAL; InOutArray: TYPE = ARRAY [1..maxSceneDepth] OF BOOL; NormalArray: TYPE = ARRAY [1..maxSceneDepth] OF Vector; SurfaceArray: TYPE = REF SurfaceArrayObj; SurfaceArrayObj: TYPE = ARRAY [1..maxSceneDepth] OF Surface; PrimitiveArray: TYPE = ARRAY [1..maxSceneDepth] OF Primitive; Primitive: TYPE = REF PrimitiveObj; PrimitiveObj: TYPE = RECORD [ name: Rope.ROPE, artwork: Artwork, assembly: REF ANY, -- a DisplayList3d.Assembly. REF ANY avoids compilation dependencies. mo: REF ANY, -- should be MasterObject but oh the compilation dependencies! rayCast: RayCastProc, rayCastNoBBoxes: RayCastNoBBoxesProc, rayCastBoundingSpheres: RayCastBoundingSpheresProc, primWRTAssembly: CoordSystem, scalars: Vector, worldWRTPrim: Matrix4by4, primWRTWorld: Matrix4by4, hints: REF ANY, -- each object type may wish to store helpful information here boundBox: BoundBox, boundSphere: BoundSphere, boundHedron: BoundHedron, inverted: BOOL, -- is this shape to be subtracted? currentRay: Ray, rayStepX: Ray]; Ray: TYPE = REF RayObj; RayObj: TYPE; -- see CSGImpl for the read record PointSetOp: TYPE = {union, intersection, difference}; Composite: TYPE = REF CompositeObj; CompositeObj: TYPE = RECORD [ name: Rope.ROPE, operation: PointSetOp, leftSolid: REF ANY, rightSolid: REF ANY, boundBox: BoundBox, boundSphere: BoundSphere]; CSGTree: TYPE = REF CSGTreeObj; CSGTreeObj: TYPE = RECORD [ name: Rope.ROPE, son: REF ANY, backgroundColor: Color, shadows: BOOL]; END. ,File: SVRayTypes.mesa Created July 29, 1984 3:16:53 pm PDT Copyright c 1984 by Xerox Corporation. All rights reserved. Last edited by Bier on July 29, 1984 3:28:12 pm PDT Types of Ray casting procedures. Remember to update DisplayListToTree.PrimitiveFromAssembly if this definition changes. Κί˜Ihead™J™$Jšœ Οmœ1™˜KLšœ˜L˜%Lšœ3˜3Lšœ˜Lšœ˜Lšœ˜Lšœ˜Lšœžœžœ >˜NLšœ˜L˜Lšœ˜Lšœ žœ "˜2Lšœ˜šœ˜L˜——Jšœžœžœ˜Jšœžœ "˜0J˜Lšœ žœ%˜5L˜Lšœ žœžœ˜#šœžœžœ˜Lšœ žœ˜Lšœ˜Lšœ žœžœ˜Lšœ žœžœ˜Lšœ˜Lšœ˜—L˜Lšœ žœžœ ˜šœ žœžœ˜Lšœ žœ˜Lšœžœžœ˜ Lšœ˜Lšœ žœ˜L˜—šžœ˜L˜L˜—J˜—…— ˜£