DIRECTORY Graphics, GraphicsColor, IO, Rope, SV2d, SV3d, SVModelTypes, SVRayTypes; SVSceneTypes: DEFINITIONS = BEGIN Artwork: TYPE = SVModelTypes.Artwork; BoundHedron: TYPE = SVModelTypes.BoundHedron; Camera: TYPE = SVModelTypes.Camera; Color: TYPE = GraphicsColor.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: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; NormalsDrawProc: TYPE = PROC[dc: Graphics.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: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; DrawSubBoxesProc: TYPE = PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; DrawSubSpheresProc: TYPE = PROC [dc: Graphics.Context, prim: Primitive, camera: Camera]; END. |File: SVSceneTypes.mesa Created July 29, 1984 3:52:37 pm PDT Copyright c 1984 by Xerox Corporation. All rights reserved. Last edited by Bier on May 23, 1985 10:56:46 pm PDT The assembly mentioned above is known throughout the system as "sceneAssembly". Translation, scaling and rotation of this assembly effects the entire scene. Master Object Class Types Master Object Types each object type will have its own way of describing its surfaces The normal is a surface normal given in local coordinates by each assembly. It is converted to camera coordinates before it is passed back to master object class code for drawing. Κ X˜Ihead™J™$Jšœ Οmœ1™J– "Cedar" styleš  œžœ˜+J– "Cedar" styleš œžœ"˜;J– "Cedar" styleš œžœ)˜IJš‘œžœžœžœ˜NJš‘œžœžœ#˜>J– "Cedar" styleš ‘ œžœžœžœžœ(˜eJ– "Cedar" styleš ‘œžœžœžœžœ(˜hJ– "Cedar" styleš ‘œžœžœžœžœ˜UJ– "Cedar" styleš‘œžœžœ+žœ˜jJ– "Cedar" stylešœžœžœ˜+šœžœžœ˜!Jšœžœžœ˜JšœA™AJšœ˜Jšœ˜Jšœ˜JšœžœŸ@˜NJ˜—J– "Cedar" stylešœ΅™΅J– "Cedar" stylešœžœžœžœ˜1J– "Cedar" styleš‘œžœžœZ˜|J– "Cedar" styleš‘œžœžœ@˜]J– "Cedar" styleš‘œžœžœ9˜XJ– "Cedar" style˜—– "Cedar" stylešžœ˜J– "Cedar" style˜M– "Cedar" style™—J˜—…—κ