<> <> <> <> <<>> DIRECTORY Imager, IO, Rope, SV2d, SV3d, SVModelTypes, SVRayTypes; SVSceneTypes: DEFINITIONS = BEGIN <<>> Artwork: TYPE = SVModelTypes.Artwork; BoundHedron: TYPE = SVModelTypes.BoundHedron; Camera: TYPE = SVModelTypes.Camera; Color: TYPE = Imager.Color; CoordSystem: TYPE = SVModelTypes.CoordSystem; FrameBox: TYPE = SVModelTypes.FrameBox; LightSourceList: TYPE = SVModelTypes.LightSourceList; Plane: TYPE = SV3d.Plane; Point3d: TYPE = SV3d.Point3d; PointSetOp: TYPE = SVRayTypes.PointSetOp; PolyDatabase: TYPE = SV3d.PolyDatabase; Primitive: TYPE = SVRayTypes.Primitive; Projection: TYPE = SVModelTypes.Projection; Vector: TYPE = SV3d.Vector; Database: TYPE = REF DatabaseObj; DatabaseObj: TYPE = RECORD [ scenes: LIST OF Scene]; Scene: TYPE = REF SceneObj; SceneObj: TYPE = RECORD [ name: Rope.ROPE, coordSysRoot: CoordSystem, -- WORLD coordinates lightSources: LightSourceList, masterObjects: MasterObjectList, assembly: Assembly, cameras: FileCameraList, cameraOrder: LIST OF Rope.ROPE, backgroundColor: Color, shadows: BOOL, dirty: BOOL]; <> Assembly: TYPE = REF AssemblyObj; AssemblyObj: TYPE = RECORD [ name: Rope.ROPE, coordSys: CoordSystem, artwork: Artwork, showAs: ShowAsType _ normal, isTool: BOOL _ FALSE, toolMasterObject: MasterObject _ NIL, shape: REF ANY, -- a Shape or an assembly list sittingOn: Rope.ROPE _ NIL -- If this assembly is sitting on the surface of another assembly, this is a way to record whose surface it is sitting on. ]; ShowAsType: TYPE = {invisible, normal, tool, both}; Shape: TYPE = REF ShapeObj; ShapeObj: TYPE = RECORD [ coordSys: CoordSystem, mo: MasterObject]; ToolData: TYPE = REF ToolDataObj; ToolDataObj: TYPE = RECORD [ block: FrameBlock, infinite: BOOL, plane: NAT, clientData: REF ANY -- currently used for Slice objects ]; FrameBlock: TYPE = REF FrameBlockObj; FrameBlockObj: TYPE = RECORD [ loX, hiX, loY, hiY, loZ, hiZ: REAL]; AssemblyList: TYPE = REF AssemblyListObj; AssemblyListObj: TYPE = RECORD [ list: LIST OF Assembly, pointSetOp: PointSetOp]; FileCamera: TYPE = REF FileCameraObj; FileCameraObj: TYPE = RECORD [ name: Rope.ROPE, origin: Point3d, focusPoint: Point3d, slant: REAL, -- the slant of the camera counter-clockwise from horizontal in degrees. resolution: REAL, focalLength: REAL, projection: Projection, frame: FrameBox, clippingPlanes: LIST OF Plane, visibleAssemblies: LIST OF Rope.ROPE]; FileCameraList: TYPE = LIST OF FileCamera; <> MasterObjectClass: TYPE = REF MasterObjectClassObj; MasterObjectClassObj: TYPE = RECORD [ name: Rope.ROPE, filein: FileinProc, fileout: FileoutProc, fileoutPoly: FileoutPolyProc, rayCast: RayCastProc, rayCastNoBBoxes: RayCastNoBBoxesProc, rayCastBoundingSpheres: RayCastBoundingSpheresProc, getHedron: BoundHedronProc, preprocess: PreprocessProc, lineDraw: LineDrawProc, normalsDraw: NormalsDrawProc, countSurf: CountPlanarSurfacesProc, getSurf: GetPlanarSurfacesProc, drawSurf: DrawPlanarSurfaceProc, drawSubBoxes: DrawSubBoxesProc, drawSubSpheres: DrawSubSpheresProc]; MasterObjectClassList: TYPE = LIST OF MasterObjectClass; <> MasterObject: TYPE = REF MasterObjectRec; MasterObjectRec: TYPE = RECORD [ name: Rope.ROPE, class: MasterObjectClass, mainBody: REF ANY _ NIL, -- information independent of imaging style lineBody: REF ANY, shadeBody: REF ANY, rayCastBody: REF ANY ]; MasterObjectList: TYPE = LIST OF MasterObject; FileoutProc: TYPE = PROC [f: IO.STREAM, mo: MasterObject]; FileinProc: TYPE = PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; FileoutPolyProc: TYPE = PROC [f: IO.STREAM, mo: MasterObject]; RayCastProc: TYPE = SVRayTypes.RayCastProc; RayCastNoBBoxesProc: TYPE = SVRayTypes.RayCastNoBBoxesProc; RayCastBoundingSpheresProc: TYPE = SVRayTypes.RayCastBoundingSpheresProc; BoundHedronProc: TYPE = PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; PreprocessProc: TYPE = PROC [prim: Primitive, camera: Camera]; LineDrawProc: TYPE = PROC[dc: Imager.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; NormalsDrawProc: TYPE = PROC[dc: Imager.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; CountPlanarSurfacesProc: TYPE = PROC [masterObject: MasterObject] RETURNS [len: NAT]; GetPlanarSurfacesProc: TYPE = PROC [assembly: Assembly, camera: CoordSystem] RETURNS [PlanarSurfaceList]; PlanarSurface: TYPE = REF PlanarSurfaceObj; PlanarSurfaceObj: TYPE = RECORD [ whichSurface: REF ANY, <> assembly: Assembly, mo: MasterObject, normal: Vector, depth: REAL]; -- in camera coords which the master object calculates (for now) <> PlanarSurfaceList: TYPE = LIST OF PlanarSurface; DrawPlanarSurfaceProc: TYPE = PROC [dc: Imager.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; DrawSubBoxesProc: TYPE = PROC [dc: Imager.Context, prim: Primitive, screenCS: CoordSystem]; DrawSubSpheresProc: TYPE = PROC [dc: Imager.Context, prim: Primitive, camera: Camera]; END. <<>>