DIRECTORY AtomButtonsTypes, BufferedRefresh, BufferedRefreshTypes, Containers, Imager, ImagerBackdoor, ImagerFont, IO, Rope, SlackProcess, SV2d, SV3d, SVBasicTypes, SVModelTypes, SVRayTypes, SVSceneTypes, SVCatScan, ViewerClasses; SVInterfaceTypes: CEDAR DEFINITIONS = BEGIN Slice: TYPE = SVSceneTypes.Slice; BoundBox: TYPE = SVBasicTypes.BoundBox; Camera: TYPE = SVModelTypes.Camera; Color: TYPE = Imager.Color; CoordSystem: TYPE = SVModelTypes.CoordSystem; CSGTree: TYPE = SVRayTypes.CSGTree; FeedbackData: TYPE = AtomButtonsTypes.FeedbackData; Matrix4by4: TYPE = SV3d.Matrix4by4; Path: TYPE = SV2d.Path; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = SV3d.Point3d; PointSetOp: TYPE = SVRayTypes.PointSetOp; Primitive: TYPE = SVRayTypes.Primitive; Scene: TYPE = SVSceneTypes.Scene; SelectMode: TYPE = SVSceneTypes.SelectMode; CatScan: TYPE = SVCatScan.CatScan; SliceDescriptor: TYPE = SVSceneTypes.SliceDescriptor; Vector3d: TYPE = SV3d.Vector3d; Viewer: TYPE = ViewerClasses.Viewer; SolidContainer: TYPE = Viewer; DisplayContextProc: TYPE = PROC [Imager.Context]; RefreshData: TYPE = RECORD [ suppressRefresh: BOOL _ FALSE, paintAction: ATOM, paintProc: DisplayContextProc, sandwich: BufferedRefreshTypes.Sandwich, caretIsMoving: BOOL _ FALSE, dragInProgress: BOOL _ FALSE, overlayList: LIST OF SliceDescriptor, orderedOverlayList: LIST OF SliceDescriptor, -- NIL => must rebuild ordered list addedObject: REF ANY _ NIL, -- used to implement GGRefresh.FinishedAdding slice: Slice, spotPoint: Point2d, -- in CAMERA coords. For TestGravity. hitPoint: Point3d, -- in WORLD coords. For TestGravity. startBoundBox: BoundBox _ NIL, currentY, minX, minY, maxX, maxY: REAL -- RayCastProgress indicators ]; DragData: TYPE = RECORD [ assembly: Slice _ NIL, -- The corresponding assembly (if any). planeDepth: REAL, -- in Target coordinates cameraVector: Vector3d, target: Slice _ NIL, startSkitter: Matrix4by4, -- in WORLD coords transform: Matrix4by4, -- in WORLD coords currentPoint: Point2d, -- in CAMERA coords selectState: SelectMode _ joint, -- what are we in the process of selecting? extendMode: SelectMode _ joint, -- what are we extending to? savedCaret: Skitter, startPoint: Point3d -- in WORLD coords ]; GravityType: TYPE = {off, pointsPreferred, linesPreferred, strictDistance}; Filters: TYPE = REF FiltersObj; FiltersObj: TYPE = RECORD [ tolerance: REAL _ 25.0, -- the tolerance for hit testing criticalR: REAL _ 25.0, -- see GGGravity.Map innerR: REAL _ 12.0, -- see GGGravity.InnerCircle sceneBag: TriggerBag, oldSceneBag: TriggerBag, hitCount: NAT _ 0, gravityType: GravityType, gravityTypeMenu: AtomButtonsTypes.EnumTypeRef, -- initialized in SVWindowImpl gravityExtentButton: AtomButtonsTypes.GraphicsState, gravButton: AtomButtonsTypes.TwoState, midpointButton: AtomButtonsTypes.TwoState, heuristicsButton: AtomButtonsTypes.TwoState, scaleUnit: REAL _ 72.0, -- value of one scale unit, in screen dots. Initially set to 72.0 (1 inch) horizontalDegrees: REAL -- slope considered horizontal. Initialized to 0 degrees (screen horizontal) ]; DebugData: TYPE = RECORD [ typescript: Viewer, lastMessage: Rope.ROPE _ NIL, logFileName: Rope.ROPE, logStream: IO.STREAM ]; GravityExtentData: TYPE = REF GravityExtentDataObj; GravityExtentDataObj: TYPE = RECORD [ extent: REAL ]; AbortFlags: TYPE = {refresh, playback, gravitytest, bags, spare2, spare3}; SVData: TYPE = REF SVDataObj; SVDataObj: TYPE = RECORD [ outer: SolidContainer _ NIL, actionArea: Viewer _ NIL, feedback: FeedbackData, height: CARDINAL _ 0, yBounded: LIST OF Viewer _ NIL, -- used in SVViewerToolImpl for viewer resizing. xBounded: LIST OF Viewer _ NIL, originalWDir: Rope.ROPE, currentWDir: Rope.ROPE, mouseMode, state: ATOM, scene: Scene, -- the collection of 3d objects we are looking at camera: Camera, -- our point of view drag: DragData, refresh: RefreshData, hitTest: Filters, debug: DebugData, slackHandle: SlackProcess.SlackHandle, aborted: PACKED ARRAY AbortFlags OF BOOL _ ALL[FALSE], textSection: ViewerTextData, editToolData: EditToolData, sceneStyleIndex: NAT, -- corresponds to camera.style baseCS: CoordSystem, -- **** mode: InteractionMode, showCoordSys: BOOL, doubleBuffer: BOOL ]; ViewerTextData: TYPE = RECORD [ activateLabel: Viewer _ NIL, viewStyle: Viewer _ NIL, xyz: Viewer _ NIL, doubleBuffer: Viewer _ NIL, showCoords: Viewer _ NIL, selected: Viewer _ NIL, isSelected: BOOL ]; InteractionMode: TYPE = {select, cast}; DCProc: TYPE = PROC [Imager.Context]; TriggerBag: TYPE = REF TriggerBagObj; TriggerBagObj: TYPE = RECORD [ tree: CSGTree, scene: Scene, slices: LIST OF FeatureData, anchor: FeatureData ]; AlignBag: TYPE = REF AlignBagObj; AlignBagObj: TYPE = RECORD [ slopeLines: LIST OF FeatureData, angleLines: LIST OF FeatureData, radiiCircles: LIST OF FeatureData, distanceLines: LIST OF FeatureData, midpoints: LIST OF FeatureData, intersectionPoints: LIST OF FeatureData, anchor: FeatureData ]; AlignmentPoint: TYPE = REF AlignmentPointObj; AlignmentPointObj: TYPE = RECORD [ point: Point2d, tangent: BOOL, -- is this a point of tangency? (for Describe purposes) curve1: FeatureData, curve2: FeatureData ]; AlignmentObject: TYPE = REF ANY; -- types: AlignmentLine, AlignmentCircle, AlignmentPoint, SliceDescriptor FeatureData: TYPE = REF FeatureDataObj; FeatureDataObj: TYPE = RECORD [ type: FeatureType, shape: AlignmentObject ]; FeatureType: TYPE = {slice, distanceLine, slopeLine, angleLine, symmetryLine, radiiCircle, intersectionPoint, midpoint, anchor}; ResultFeatureType: TYPE = {slice, distanceLine, slopeLine, angleLine, symmetryLine, radiiCircle, intersectionPoint, midpoint, anchor}; EditToolData: TYPE = REF EditToolDataObj; EditToolDataObj: TYPE = RECORD [ outer: Containers.Container _ NIL, height: CARDINAL _ 0, printFont: ImagerFont.Font, screenFont: ImagerFont.Font, skitter: Skitter, sceneSection: CurrentSceneSectionData, sphereSection: SphereSectionData, blockSection: BlockSectionData, cylinderSection: CylinderSectionData, coneSection: ConeSectionData, torusSection: TorusSectionData, linSection: LinSectionData, transformSection: TransformSectionData, cameraSection: CameraSectionData, cameraOrderSection: CameraOrderSectionData, shadowSection: ShadowSectionData, artworkSection: ArtworkSectionData, artworkTransformSection: ArtworkTransformSectionData, lightSection: LightSectionData, utilitySection: UtilitySectionData, scratchpad: Viewer, artworkTool: Viewer, messages: Viewer, allViewers: LIST OF ViewerCell, currentSVData: SVData, originalWorkingDirectory: Rope.ROPE ]; ViewerCell: TYPE = REF ViewerCellObj; ViewerCellObj: TYPE = RECORD [ scene: Scene, viewersOnScene: Viewer]; -- viewersOnScene is a list of viewers since each viewer has a link to the next one. CurrentSceneSectionData: TYPE = RECORD [ defaultScene: Scene, currentScene: Scene _ NIL, sceneName: Viewer _ NIL, current: Viewer _ NIL, text1: Viewer _ NIL, text2: Viewer _ NIL, source: Viewer _ NIL, target: Viewer _ NIL, new: Viewer _ NIL, parent: Viewer _ NIL, plane: Viewer _ NIL, opLabel: Viewer _ NIL, op: PointSetOp]; SphereSectionData: TYPE = RECORD [ radius: Viewer _ NIL]; BlockSectionData: TYPE = RECORD [ xyz: Viewer _ NIL]; CylinderSectionData: TYPE = RECORD [ radius: Viewer _ NIL, height: Viewer _ NIL]; ConeSectionData: TYPE = RECORD [ radius: Viewer _ NIL, height: Viewer _ NIL]; TorusSectionData: TYPE = RECORD [ bigRadius: Viewer _ NIL, sectionRadius: Viewer _ NIL]; LinSectionData: TYPE = RECORD [ depth: Viewer _ NIL]; TransformSectionData: TYPE = RECORD [ degrees: Viewer _ NIL, transXYZ: Viewer _ NIL, scaleXYZ: Viewer _ NIL, scalar: Viewer _ NIL]; CameraSectionData: TYPE = RECORD [ name: Viewer _ NIL, origin: Viewer _ NIL, focusPoint: Viewer _ NIL, slant: Viewer _ NIL, resolution: Viewer _ NIL, focalLength: Viewer _ NIL, projection: Viewer _ NIL, projectionValue: NAT _ 1, frame: Viewer _ NIL, clippingPlanes: Viewer _ NIL, visibleAssemblies: Viewer _ NIL]; CameraOrderSectionData: TYPE = RECORD [ order: Viewer _ NIL]; ShadowSectionData: TYPE = RECORD [ shadowLabel: Viewer _ NIL, shadowValue: BOOL _ FALSE]; ArtworkSectionData: TYPE = RECORD [ tubeHeight: Viewer _ NIL, tubeRadius: Viewer _ NIL, boxXYZ: Viewer _ NIL, picName: Viewer _ NIL, material: Viewer _ NIL, materialValue: NAT _ 1, resolution: Viewer _ NIL, isColor: Viewer _ NIL, rgb: Viewer _ NIL, oMapLabel: Viewer _ NIL]; ArtworkTransformSectionData: TYPE = RECORD [ degrees: Viewer _ NIL]; LightSectionData: TYPE = RECORD [ name: Viewer _ NIL, position: Viewer _ NIL, color: Viewer _ NIL]; UtilitySectionData: TYPE = RECORD [ stuffNum: Viewer _ NIL]; Skitter: TYPE = REF SkitterObj; SkitterObj: TYPE = SVSceneTypes.SkitterObj; Selection: TYPE = REF SelectionObj; SelectionObj: TYPE = RECORD [ coincident: Slice, -- the hook jack, floater jack, or sitting-in for coordSys referents. indirect: Slice, -- the assembly we claim to be sitting on if we are a hook, NIL otherwise. svData: SVData, referentType: ReferentType, selectionType: SelectionType]; ReferentType: TYPE = {hook, coordSys}; SelectionType: TYPE = {target, movee, plane}; SelectionGenerator: TYPE = REF SelectionGeneratorObj; SelectionGeneratorObj: TYPE = RECORD [ currentPtr: LIST OF Selection ]; Artwork: TYPE = SVModelTypes.Artwork; ArtworkToolData: TYPE = REF ArtworkToolDataObj; ArtworkToolDataObj: TYPE = RECORD [ outer: Containers.Container _ NIL, editToolData: EditToolData, height: CARDINAL _ 0, picture: Viewer _ NIL, textSection: TextSectionData, origin: Point2d, scalar: REAL, proc: PROC [dc: Imager.Context], artwork: Artwork, paintColor: Color]; TextSectionData: TYPE = RECORD [ scalar: Viewer _ NIL, color: Viewer _ NIL ]; ScratchViewerData: TYPE = REF ScratchViewerDataObj; ScratchViewerDataObj: TYPE = RECORD [ outer: Containers.Container _ NIL, -- handle for the enclosing container height: CARDINAL _ 0, textSection: ScratchTextSectionData, scratchpad: ViewerClasses.Viewer _ NIL, editToolData: EditToolData ]; ScratchTextSectionData: TYPE = REF TextSectionDataObj; TextSectionDataObj: TYPE = RECORD [ degrees: ViewerClasses.Viewer _ NIL]; ScratchpadData: TYPE = REF ScratchpadDataObj; ScratchpadDataObj: TYPE = RECORD [ origin: Point2d, path: Path, catScan: CatScan, mode: ScratchpadMode, index: NAT, scratchViewerData: ScratchViewerData, proc: ImagerProc, imager: Imager.Context]; ImagerProc: TYPE = PROC [dc: Imager.Context]; ScratchpadMode: TYPE = {off, pointAt, drawLin, drawRevo, drawCatScan}; END. –File: SVInterfaceTypes.mesa Last edited by: Eric Bier on May 27, 1987 1:15:38 pm PDT Copyright c 1984 by Xerox Corporation. All rights reserved. Contents: Defining these types in the modules which use them just doesn't seem to work. Compilation dependencies reign. Many objects wish to contain pointers to these records, which in turn wish to contain objects of that type. Let's try putting them all in one place. SVData triggerBag: TriggerBag, alignBag: ObjectBag, slopeHeader: AtomButtons.ScalarButtonHandle, slopeCount: NAT _ 0, angleHeader: AtomButtons.ScalarButtonHandle, angleCount: NAT _ 0, radiusHeader: AtomButtons.ScalarButtonHandle, radiusCount: NAT _ 0, radiusCircleCache: GGCircleCache.Cache, distanceHeader: AtomButtons.ScalarButtonHandle, distanceCount: NAT _ 0, Allocated in SVViewerImpl.CreateViewerTool Unique to Gargoyle3d Hit Testing The EditTool Selections Artwork Tool Scratchpads ΚK˜Iheadšœ™J™8Jšœ Οmœ1™Lšœ žœŸ˜*L˜Lšœžœ˜LšœŸ˜,LšœŸ˜)LšœŸ˜*Mšœ!Ÿ,˜MMšœ Ÿ˜