DIRECTORY Basics, GGBasicTypes, GGCoreTypes, GGHistoryTypes, GGInterfaceTypes, GGModelTypes, ImagerColor, RefTab, Rope; GGUtility: CEDAR DEFINITIONS = BEGIN BitVector: TYPE = GGBasicTypes.BitVector; Color: TYPE = ImagerColor.Color; FeatureData: TYPE = GGModelTypes.FeatureData; GGData: TYPE = GGInterfaceTypes.GGData; HistoryEvent: TYPE = GGHistoryTypes.HistoryEvent; Scene: TYPE = GGModelTypes.Scene; Slice: TYPE = GGModelTypes.Slice; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; Sequence: TYPE = GGModelTypes.Sequence; SequenceOfReal: TYPE = GGCoreTypes.SequenceOfReal; Traj: TYPE = GGModelTypes.Traj; version: REAL; -- e.g. 8708.21 versionRope: Rope.ROPE; -- e.g. "8708.21" StartFeatureDataList: PROC [] RETURNS [entityList, ptr: LIST OF FeatureData]; AddFeatureData: PROC [entity: FeatureData, entityList, ptr: LIST OF FeatureData] RETURNS [newList, newPtr: LIST OF FeatureData]; CopyFeatureDataList: PROC [l: LIST OF FeatureData] RETURNS [copyList: LIST OF FeatureData]; FeatureDataNconc: PROC [l1, l2: LIST OF FeatureData] RETURNS [bigList: LIST OF FeatureData]; StartSequenceList: PROC [] RETURNS [entityList, ptr: LIST OF Sequence]; AddSequence: PROC [entity: Sequence, entityList, ptr: LIST OF Sequence] RETURNS [newList, newPtr: LIST OF Sequence]; AppendSequenceList: PROC [list1, list2: LIST OF Sequence] RETURNS [result: LIST OF Sequence]; DeleteSequenceFromList: PROC [seq: Sequence, seqList: LIST OF Sequence] RETURNS [smallerList: LIST OF Sequence]; SequenceSubst: PROC [new, old: Sequence, expr: LIST OF Sequence] RETURNS [head: LIST OF Sequence ¬ NIL]; StartSliceDescriptorList: PROC [] RETURNS [entityList, ptr: LIST OF SliceDescriptor]; AddSliceDescriptor: PROC [entity: SliceDescriptor, entityList, ptr: LIST OF SliceDescriptor] RETURNS [newList, newPtr: LIST OF SliceDescriptor]; AppendSliceDescriptorList: PROC [list1, list2: LIST OF SliceDescriptor] RETURNS [result: LIST OF SliceDescriptor]; DeleteSliceDescriptorFromList: PROC [sliceD: SliceDescriptor, sliceDList: LIST OF SliceDescriptor] RETURNS [smallerList: LIST OF SliceDescriptor]; CopySliceDescriptorList: PROC [list: LIST OF SliceDescriptor] RETURNS [copy: LIST OF SliceDescriptor]; StartSliceList: PROC [] RETURNS [entityList, ptr: LIST OF Slice]; AddSlice: PROC [entity: Slice, entityList, ptr: LIST OF Slice] RETURNS [newList, newPtr: LIST OF Slice]; AppendSliceList: PROC [list1, list2: LIST OF Slice] RETURNS [result: LIST OF Slice]; DeleteSliceFromList: PROC [slice: Slice, sliceList: LIST OF Slice] RETURNS [smallerList: LIST OF Slice]; FindSliceAndNeighbors: PROC [slice: Slice, sliceList: LIST OF Slice] RETURNS [beforeEnt, ent, afterEnt: LIST OF Slice, found: BOOL ¬ FALSE]; CopySliceList: PROC [sliceList: LIST OF Slice] RETURNS [copyList: LIST OF Slice]; Comparison: TYPE = Basics.Comparison; SliceCompareProc: TYPE = PROC [ref1: Slice, ref2: Slice] RETURNS [Comparison]; SortSliceList: PROC [list: LIST OF Slice, compareProc: SliceCompareProc] RETURNS [LIST OF Slice]; SortSliceListByPriority: PROC [list: LIST OF Slice] RETURNS [LIST OF Slice]; OverlapOrder: TYPE = {incr, decr}; OrderedSelectionList: PROC [ggData: GGData, order: OverlapOrder, andSelectEntire: BOOL ¬ FALSE] RETURNS [list: LIST OF Slice]; CopySceneClean: PROC [scene: Scene, copyAll: BOOL ¬ FALSE] RETURNS [virginList: LIST OF Slice, virginMap: RefTab.Ref]; RestoreSceneClean: PROC [scene: Scene, virginList: LIST OF Slice, virginMap: RefTab.Ref]; UnlinkCapturedScene: PROC [historyEvent: HistoryEvent]; StartTrajList: PROC [] RETURNS [entityList, ptr: LIST OF Traj]; AddTraj: PROC [entity: Traj, entityList, ptr: LIST OF Traj] RETURNS [newList, newPtr: LIST OF Traj]; AllFalse: PROC [bitvec: BitVector] RETURNS [BOOL]; AllTrue: PROC [bitvec: BitVector] RETURNS [BOOL]; plusInfinity: REAL = 1E16; minusInfinity: REAL = -1E16; epsilonInPoints: REAL = 7.2E-4; epsilonInInches: REAL = 1.0E-5; ChangeHue: PROC [startColor: Color, hueFrom: Color] RETURNS [newColor: Color]; CopyPattern: PROC [pattern: SequenceOfReal] RETURNS [new: SequenceOfReal]; EquivalentPatterns: PROC [p1, p2: SequenceOfReal] RETURNS [BOOL ¬ FALSE]; DescribeTraj: PROC [traj: Traj] RETURNS [text: Rope.ROPE]; DescribeColor: PROC [color: Color] RETURNS [rope: Rope.ROPE]; DescribeSequence: PROC [seq: Sequence] RETURNS [text: Rope.ROPE]; DescribeControlPoint: PROC [traj: Traj, segNum: NAT, cpNum: NAT] RETURNS [text: Rope.ROPE]; DescribeJoint: PROC [traj: Traj, jointNum: NAT] RETURNS [text: Rope.ROPE]; DescribeSegment: PROC [traj: Traj, segNum: NAT] RETURNS [text: Rope.ROPE]; DescribeInterior: PROC [traj: Traj] RETURNS [text: Rope.ROPE]; END. ͺGGUtility.mesa Copyright Σ 1986, 1988, 1989, 1990, 1991, 1992 by Xerox Corporation. All rights reserved. Pier, September 18, 1990 4:52 pm PDT Bier, June 3, 1991 6:24 pm PDT Doug Wyatt, April 20, 1992 12:40 pm PDT Contents: General Purpose routines for use by Gargoyle. Operations on LIST OF FeatureData Operations on LIST OF Sequence Operations on LIST OF SliceDescriptor Operations on LIST OF Slice Sorts back to front. traverse the scene entities from beginning (back) to end (front), making a clean copy of the scene list from unselected slices AND copies of selected slices. Also, return a RefTab that maps the copies onto their originals. restores ggData.scene.entities to its original state as specified by the virginList and virginMap unlinks a captured clean scene which is no longer needed. Trying to help the garbage collector here. Caller must guarantee that the historyEvent isn't used elsewhere. Operations on LIST OF Traj Operations on Bit Vectors Operations on REAL For algorithms that need a variable initialized to an impossibly large number. Unfortunately, Real.PlusInfinity can't be compared with anything. These sizes were chosen so that they can be scaled by 1000 and squared once without causing overflow. (Many geometric algorithms work with distance squared to keep from doing square roots) Gargoyle guarantees accuracy to within 0.001 inches, or 0.072 screen dots. Allowing two orders of magnitude leeway gives 10-5 inches or 7.2 * 10-4 screen dots. Colors and Dash Patterns In GGUtilityImplA.mesa GetSpecialColor moved to GGPort Text Descriptions of Simple Data Types Transforms the color (does nothing if color is not a sampled color or sampled black). Κν–(cedarcode) style•NewlineDelimiter ˜code™Kšœ ΟeœO™ZKšœ$™$K™K™'K™KšΟnœ0™8—K˜šΟk ˜ K˜m—K˜Kšž œŸœŸ œŸ˜$Iproc˜Kšœ Ÿœ˜)LšœŸœ˜ Kšœ Ÿœ˜-KšœŸœ˜'KšœŸœ˜1KšœŸœ˜!KšœŸœ˜!KšœŸœ ˜5Kšœ Ÿœ˜'KšœŸœ˜2KšœŸœ˜L˜Lšœ ŸœΟc˜LšœŸœ ˜)K˜KšœŸœŸœ ™!K™Kš žœŸœŸœŸœŸœ˜MKšžœŸœ(ŸœŸœŸœŸœŸœ˜€KšžœŸœŸœŸœŸœ ŸœŸœ˜[KšžœŸœ ŸœŸœŸœ ŸœŸœ˜\K˜KšœŸœŸœ ™K™Kš žœŸœŸœŸœŸœ ˜GKšž œŸœ%ŸœŸœ ŸœŸœŸœ ˜tKšžœŸœŸœŸœ Ÿœ ŸœŸœ ˜]KšžœŸœŸœŸœ ŸœŸœŸœ ˜pKšž œŸœŸœŸœ ŸœŸœŸœ Ÿœ˜hK™KšœŸœŸœ™%K™Kš žœŸœŸœŸœŸœ˜UKšžœŸœ,ŸœŸœŸœŸœŸœ˜KšžœŸœŸœŸœŸœ ŸœŸœ˜rKšžœŸœ'ŸœŸœŸœŸœŸœ˜’KšžœŸœŸœŸœŸœŸœŸœ˜fK˜KšœŸœŸœ™K™Kš žœŸœŸœŸœŸœ˜AKšžœŸœ"ŸœŸœŸœŸœŸœ˜hKšžœŸœŸœŸœŸœ ŸœŸœ˜TKšžœŸœŸœŸœŸœŸœŸœ˜hKšžœŸœŸœŸœŸœŸœŸœŸœŸœ˜ŒKšž œŸœ ŸœŸœŸœ ŸœŸœ˜QK˜Kšœ Ÿœ˜%KšœŸœŸœŸœ˜NKšž œŸœŸœŸœ'ŸœŸœŸœ˜ašžœŸœŸœŸœŸœŸœŸœ˜LK™—KšœŸœ˜"KšžœŸœ8ŸœŸœŸœŸœŸœ˜~šžœŸœŸœŸœŸœŸœŸœ˜vKšœƒΟb œS™ί—šžœŸœŸœŸœ˜YKšœa™a—šžœŸœ˜7Kšœ¨™¨—K™šœŸœŸœ™K™—Kš ž œŸœŸœŸœŸœ˜?KšžœŸœ!ŸœŸœŸœŸœŸœ˜dK˜šœ™K˜—KšžœŸœŸœŸœ˜2KšžœŸœŸœŸœ˜1K˜šœŸ™K™KšœΠ™ΠK™—KšœŸœ˜šœŸœ ˜Kšœ|Οuœ’œ ™ —KšœŸœ ˜KšœŸœ ˜K˜™K™—K™L™Lšž œŸœ%Ÿœ˜NLšž œŸœŸœ˜JLš žœŸœŸœŸœŸœ˜IL˜L™&Kšž œŸœŸœ Ÿœ˜:Kšž œŸœŸœ Ÿœ˜=KšžœŸœŸœ Ÿœ˜AKš žœŸœŸœ ŸœŸœ Ÿœ˜[Kš ž œŸœŸœŸœ Ÿœ˜JKš žœŸœŸœŸœ Ÿœ˜JšžœŸœŸœ Ÿœ˜>KšœU™U—L˜KšŸœ˜—…—ό“