<> <> <> <> DIRECTORY BitMap3d, Containers, CoordSys, CSG, DisplayList3d, Graphics, GraphicsColor, IO, Matrix3d, Menus, Rope, SV2d, SVViewerUser, SweepGeometry, ViewerClasses; SVEditUser: CEDAR DEFINITIONS = BEGIN Assembly: TYPE = DisplayList3d.Assembly; Camera: TYPE = DisplayList3d.Camera; Color: TYPE = GraphicsColor.Color; CoordSystem: TYPE = REF CoordSysObj; CoordSysObj: TYPE = CoordSys.CoordSysObj; DCProc: TYPE = SVViewerUser.DCProc; Matrix4by4: TYPE = Matrix3d.Matrix4by4; MouseButton: TYPE = Menus.MouseButton; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = Matrix3d.Point3d; PointSetOp: TYPE = CSG.PointSetOp; Primitive: TYPE = CSG.Primitive; Scene: TYPE = DisplayList3d.Scene; Viewer: TYPE = ViewerClasses.Viewer; ViewerToolData: TYPE = SVViewerUser.ViewerToolData; ViewerProc: TYPE = PROC [Graphics.Context, ViewerToolData]; Selection: TYPE = REF SelectionObj; SelectionObj: TYPE = RECORD [ cameraPoint: Point2d, assembly: Assembly, primitive: Primitive, coordSys: CoordSystem, viewerToolData: ViewerToolData]; <> EditToolData: TYPE = REF EditToolDataObj; EditToolDataObj: TYPE = RECORD [ outer: Containers.Container _ NIL,-- handle for the enclosing container height: CARDINAL _ 0, sceneSection: CurrentSceneSectionData, sphereSection: SphereSectionData, blockSection: BlockSectionData, cylinderSection: CylinderSectionData, coneSection: ConeSectionData, torusSection: TorusSectionData, linSection: LinSectionData, copySection: CopySectionData, renameSection: RenameSectionData, transformSection: TransformSectionData, cameraSection: CameraSectionData, cameraOrderSection: CameraOrderSectionData, shadowSection: ShadowSectionData, artworkSection: ArtworkSectionData, artworkTransformSection: ArtworkTransformSectionData, lightSection: LightSectionData, utilitySection: UtilitySectionData, scratchpad: Viewer, artworkTool: Viewer, allViewers: LIST OF ViewerCell, currentViewerToolData: ViewerToolData -- to ward off compilation dependencies ]; 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: ViewerClasses.Viewer _ NIL, assemblyName: ViewerClasses.Viewer _ NIL, wrt: ViewerClasses.Viewer _ NIL, opLabel: ViewerClasses.Viewer _ NIL, op: PointSetOp]; SphereSectionData: TYPE = RECORD [ radius: ViewerClasses.Viewer _ NIL]; BlockSectionData: TYPE = RECORD [ xyz: ViewerClasses.Viewer _ NIL]; CylinderSectionData: TYPE = RECORD [ radius: ViewerClasses.Viewer _ NIL, height: ViewerClasses.Viewer _ NIL]; ConeSectionData: TYPE = RECORD [ radius: ViewerClasses.Viewer _ NIL, height: ViewerClasses.Viewer _ NIL]; TorusSectionData: TYPE = RECORD [ bigRadius: ViewerClasses.Viewer _ NIL, sectionRadius: ViewerClasses.Viewer _ NIL]; LinSectionData: TYPE = RECORD [ depth: ViewerClasses.Viewer _ NIL]; CopySectionData: TYPE = RECORD [ prefix: ViewerClasses.Viewer _ NIL, assemblyName: ViewerClasses.Viewer _ NIL]; RenameSectionData: TYPE = RECORD [ newName: ViewerClasses.Viewer _ NIL]; TransformSectionData: TYPE = RECORD [ degrees: ViewerClasses.Viewer _ NIL, transXYZ: ViewerClasses.Viewer _ NIL, scaleXYZ: ViewerClasses.Viewer _ NIL, scalar: ViewerClasses.Viewer _ NIL]; CameraSectionData: TYPE = RECORD [ name: ViewerClasses.Viewer _ NIL, origin: ViewerClasses.Viewer _ NIL, focusPoint: ViewerClasses.Viewer _ NIL, slant: ViewerClasses.Viewer _ NIL, resolution: ViewerClasses.Viewer _ NIL, focalLength: ViewerClasses.Viewer _ NIL, frame: ViewerClasses.Viewer _ NIL, clippingPlanes: ViewerClasses.Viewer _ NIL, visibleAssemblies: ViewerClasses.Viewer _ NIL]; CameraOrderSectionData: TYPE = RECORD [ order: ViewerClasses.Viewer _ NIL]; ShadowSectionData: TYPE = RECORD [ shadowLabel: ViewerClasses.Viewer _ NIL, shadowValue: BOOL _ FALSE]; ArtworkSectionData: TYPE = RECORD [ tubeHeight: ViewerClasses.Viewer _ NIL, tubeRadius: ViewerClasses.Viewer _ NIL, boxXYZ: ViewerClasses.Viewer _ NIL, picName: ViewerClasses.Viewer _ NIL, material: ViewerClasses.Viewer _ NIL, materialValue: NAT, resolution: ViewerClasses.Viewer _ NIL, isColor: ViewerClasses.Viewer _ NIL, rgb: ViewerClasses.Viewer _ NIL, oMapLabel: ViewerClasses.Viewer _ NIL]; ArtworkTransformSectionData: TYPE = RECORD [ degrees: ViewerClasses.Viewer _ NIL]; LightSectionData: TYPE = RECORD [ name: ViewerClasses.Viewer _ NIL, position: ViewerClasses.Viewer _ NIL, color: ViewerClasses.Viewer _ NIL]; UtilitySectionData: TYPE = RECORD [ stuffNum: ViewerClasses.Viewer _ NIL]; globalMatCount: NAT = 2; globalMatArray: ARRAY[1..globalMatCount] OF Rope.ROPE; -- implemented in SVEditUserImplB <> <> DrawAnySelections: PROC [dc: Graphics.Context, viewerToolData: ViewerToolData]; <> SetPrimarySelection: PROC [cameraPoint: Point2d, assembly: Assembly, primitive: Primitive, worldMat: Matrix4by4, viewerToolData: ViewerToolData] RETURNS [selection: Selection]; SetSecondarySelection: PROC [cameraPoint: Point2d, assembly: Assembly, primitive: Primitive, worldMat: Matrix4by4, viewerToolData: ViewerToolData] RETURNS [selection: Selection]; SetFinalPrimary: PROC [cameraPoint: Point2d, assembly: Assembly, primitive: Primitive, worldMat: Matrix4by4, viewerToolData: ViewerToolData] RETURNS [selection: Selection]; SetFinalSecondary: PROC [cameraPoint: Point2d, assembly: Assembly, primitive: Primitive, worldMat: Matrix4by4, viewerToolData: ViewerToolData] RETURNS [selection: Selection]; GetPrimarySelection: PROC RETURNS [selection: Selection]; GetSecondarySelection: PROC RETURNS [selection: Selection]; GetFinalPrimary: PROC RETURNS [selection: Selection]; GetFinalSecondary: PROC RETURNS [selection: Selection]; ExtendSecondary: PROC; NotifyOfExtendedSelection: PROC [viewerToolData: ViewerToolData, oldSelection: Selection, newSelection: Selection]; <> <> Painter: PROC [proc: ViewerProc, editToolData: EditToolData, scene: Scene]; GetOutHandle: PROC RETURNS [outHandle: IO.STREAM]; LoadScene: PROC [viewerToolData: ViewerToolData, picName: Rope.ROPE] RETURNS [scene: Scene, success: BOOL]; SaveScene: PROC [viewerToolData: ViewerToolData, picName: Rope.ROPE] RETURNS [success: BOOL]; StoreScene: PROC [viewerToolData: ViewerToolData, scene: Scene, picName: Rope.ROPE] RETURNS [success: BOOL]; NotifyOfEmpty: PROC [viewerToolData: ViewerToolData, from: Scene, to: Scene]; NotifyDestroy: PROC [viewer: Viewer]; SceneNewVersion: PROC [viewerToolData: ViewerToolData, scene: Scene];-- loops through split viewers updating headers UpdateAllHeaders: PROC [viewerToolData: ViewerToolData, scene: Scene];-- loops through split viewers updating headers SceneOldVersion: PROC [viewerToolData: ViewerToolData, scene: Scene];-- loops through split viewers updating headers NewSelectedViewer: PROC [viewerToolData: ViewerToolData]; <> ReSelectViewer: PROC [viewerToolData: ViewerToolData]; <> SetAssembly: PROC [assembly: Assembly, editToolData: EditToolData]; Split: PROC [viewerToolData: ViewerToolData, scene: Scene]; <> GetCoordSys: PROC [viewer: Viewer, scene: Scene] RETURNS [cs: CoordSystem, success: BOOL]; GetAssembly: PROC [viewer: Viewer, scene: Scene] RETURNS [as: Assembly, success: BOOL]; FindAssemblyFromName: PROC [name: Rope.ROPE, scene: Scene] RETURNS [assembly: Assembly, superAssembly: Assembly, found: BOOL]; GetSuper: PROC [editToolData: EditToolData] RETURNS [super: Assembly, success: BOOL]; GetPoint3d: PROC [textViewer: Viewer] RETURNS [pt: Point3d]; DrawSceneInternal: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; FindSceneInAllViewers: PROC [scene: Scene, allViewers: LIST OF ViewerCell] RETURNS [viewerCell: ViewerCell, success: BOOL]; AddSceneToAllViewers: PROC [scene: Scene, allViewers: LIST OF ViewerCell] RETURNS [viewerCell: ViewerCell, newAllViewers: LIST OF ViewerCell]; FindViewerInAllViewers: PROC [viewer: Viewer, allViewers: LIST OF ViewerCell] RETURNS [viewerCell: ViewerCell, before, listCell, after: Viewer, success: BOOL]; FindViewerInViewerCell: PROC [viewer: Viewer, viewerCell: ViewerCell] RETURNS [before, listCell, after: Viewer, success: BOOL]; DeleteViewerFromAllViewers: PROC [viewerCell: ViewerCell, before, listCell, after: Viewer]; AddViewerToViewerCell: PROC [viewer: Viewer, viewerCell: ViewerCell]; <> <> ScenePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AssemblyNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; WithRespectToPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RGBPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SphereRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; BlockXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CylinderRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CylinderHeightPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConeRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ConeHeightPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; BigRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SectionRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; LinDepthPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; StuffPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DegreesPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; TranslateXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ScaleXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; EvenScaleXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CameraNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; FocusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ScanResolutionPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CameraOriginPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SlantPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; FocalLengthPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; FramePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ClippingPlanePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; VisibleAssemblyPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CameraOrderPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; PrefixPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; CopyFromPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; NewNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ResolutionPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; TubeHeightPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; TubeRadiusPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; BoxXYZPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ArtworkNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ArtworkDegreesPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; LightNamePrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; LightPositionPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; LightColorPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; <> SetShadows: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; <> SelectOp: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; IsColor: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; <> MaterialCycle: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; BoxOCycle: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ShadowsPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; <> NewViewer: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; NewOutput: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; <> First: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DrawCS: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Delete: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SetColor: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SetOp: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; SetColorMap: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; BWMap: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RotX: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RotY: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; RotZ: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Trans: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ScalePrimitive: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; EvenScale: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Edit: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddComposite: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; ARay: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; <> AddHalfSpace: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddSphere: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddBlock: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddCyl: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddCone: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddTorus: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddRevo: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; AddLinear: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; DeleteObject: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Copy: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Rename: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; Move: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL]; END.