DIRECTORY Rope, SV2d, SV3d, SVModelTypes, SVVector3d; CoordSys: DEFINITIONS = BEGIN CoordSystem: TYPE = SVModelTypes.CoordSystem; CoordSysList: TYPE = SVModelTypes.CoordSysList; Matrix4by4: TYPE = SV3d.Matrix4by4; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = SV3d.Point3d; Vector: TYPE = SVVector3d.Vector; CreateRoot: PROC [name: Rope.ROPE] RETURNS [newCS: CoordSystem]; CreateCoordSysInTree: PROC [name: Rope.ROPE, mat: Matrix4by4, parent: CoordSystem, root: CoordSystem] RETURNS [newCS: CoordSystem]; NameAlreadyExists: SIGNAL; CreateScalarsOnlyCoordSysInTree: PROC [name: Rope.ROPE, scalars: Vector, parent: CoordSystem, root: CoordSystem] RETURNS [newCS: CoordSystem]; CopyCoordSysFromAnyTree: PROC [source: CoordSystem, newName: Rope.ROPE, parent: CoordSystem, root: CoordSystem] RETURNS [newCS: CoordSystem]; ResetScalars: PROC [cs: CoordSystem, scalars: Vector]; GetScalars: PROC [cs: CoordSystem] RETURNS [scalars: Vector]; DeleteCoordSysAndChildren: PROC [cs: CoordSystem, root: CoordSystem]; MakeListFromTree: PROC [root: CoordSystem] RETURNS [csl: CoordSysList]; TSortCoordSysListByBreadth: PUBLIC PROC [csl: CoordSysList] RETURNS [sortedCsl: CoordSysList]; FindCoordSysInTree: PROC [name: Rope.ROPE, root: CoordSystem] RETURNS [cs: CoordSystem]; CoordSysNotFound: SIGNAL; CoordSysListEmpty: SIGNAL; CoordSysNameIsPresent: PROC [name: Rope.ROPE, root: CoordSystem] RETURNS [BOOL]; FindCoordSysInList: PROC [name: Rope.ROPE, csl: CoordSysList] RETURNS [cs: CoordSystem]; FindCoordSysAndNeighborsInList: PROC [name: Rope.ROPE, csl: CoordSysList] RETURNS [beforeCS, cs, afterCS: CoordSysList]; BaseAndNumber: PROC [name: Rope.ROPE] RETURNS [base: Rope.ROPE, number: NAT]; UniqueNameWithSuffix: PROC [oldName: Rope.ROPE, suffix: Rope.ROPE, root: CoordSystem] RETURNS [unique: Rope.ROPE]; UniqueNameFrom: PROC [name: Rope.ROPE, root: CoordSystem] RETURNS [unique: Rope.ROPE]; CameraToScreen: PROC [cameraPoint2d: Point2d, screenCoordSys: CoordSystem] RETURNS [screenPoint2d: Point2d]; ScreenToCamera: PROC [screenPoint2d: Point2d, screenCoordSys: CoordSystem] RETURNS [cameraPoint2d: Point2d]; FromCSToCS: PROC [pt: Point3d, currentCS: CoordSystem, newCS: CoordSystem] RETURNS [newPt: Point3d]; FromCSToCSMat: PROC [mat: Matrix4by4, currentCS: CoordSystem, newCS: CoordSystem] RETURNS [newMat: Matrix4by4]; FindInTermsOfWorld: PROC [cs: CoordSystem] RETURNS [mat: Matrix4by4]; FindInTermsOfCamera: PROC [cs: CoordSystem, camera: CoordSystem] RETURNS [mat: Matrix4by4]; FindWorldInTermsOf: PROC [cs: CoordSystem] RETURNS [mat: Matrix4by4]; FindCameraInTermsOf: PROC [cs: CoordSystem, camera: CoordSystem] RETURNS [mat: Matrix4by4]; FindAInTermsOfB: PROC [a: CoordSystem, b: CoordSystem] RETURNS [mat: Matrix4by4]; FindTranslationOfAinTermsOfB: PROC [a: CoordSystem, b: CoordSystem] RETURNS [displacements: Vector]; PutAInTermsOfB: PROC [a: CoordSystem, b: CoordSystem] RETURNS [mat: Matrix4by4]; END. κFile: CoordSys.mesa Last edited by Bier on August 5, 1984 10:08:44 pm PDT Author: Eric Bier in June, 1982 Contents: Allocation and access to a user-specified set of named coordinate systems Like CreateCoordSysInTree but uses the matrix from the old CoordSys. If source is a scalars-only coordsys, then newCS will be as well. cs must be scalarsOnly. cs must be scalarsOnly. Produces a list of the CoordSystem's in subtree rooted at root. The list is in breadth-first order. This procedure is on its way out. MakeListFromTree produces a breadth-sorted list. This procedure is on its way out. Use FindCoordSysInTree when possible. Signals CoordSysNotFound if that is the case. Takes a solidviews name, like "teapot.73". Adds the suffix to the basename and fixes the number to ensure uniqueness. If the suffix were "$$tool", then UniqueNameWithSuffix might return "teapot$$tool.89". Takes a solidviews name, like "teapot.73". Fixes the number to ensure uniqueness. UniqueNameFrom might return "teapot.106". Takes ptcurrentCS and returns ptnewCS. Takes matcurrentCS and returns matnewCS. The above three procs return the relevant matrix with no side effects A New Parent Finds the matrix and redefines CoordSystem a to be in terms of b from now on. Κί– "cedar" style˜Iheadšœ™Iprocšœ5™5Lšœ™LšœS™SL˜šΟk ˜ Lšœ˜L˜Lšœ˜Lšœ ˜ Lšœ ˜ —L˜Lšœ  œ˜Lš˜˜Lšœ œ˜-Lšœœ˜/Lšœ œ˜#Lšœ œ˜Lšœ œ˜Lšœœ˜!L˜—L˜LšΟn œœ œœ˜@Lšžœœ œ;œ˜ƒLšœœ˜Lšžœœ œ;œ˜Žšžœœ%œ*œ˜Lšœ‡™‡—L˜šž œœ$˜6Lšœ™—šž œœœ˜=Lšœ™—L˜Lšžœœ&˜EL˜šžœœœ˜GLšœc™c—šžœœœœ˜^LšœS™S—J˜Jšžœœ œœ˜XLšœœ˜Lšœœ˜Jš žœœ œœœ˜Pšžœœ œœ˜XLšœH™H—Lšžœœ œœ'˜xL˜˜Lšœ-™-—Jš ž œœ œœ œ œ˜Mš žœœœœœœ˜rJšœΞ™Ξ—– "Cedar" styleš žœœ œœœ˜VJ– "Cedar" stylešœ}™}—L˜Lšžœœ7œ˜lLšžœœ7œ˜lšž œœ;œ˜dJšœΟu œŸœ™&—šž œœ?œ˜oJšœ Ÿ œŸœ™(—L˜Lšžœœœ˜ELšžœœ(œ˜[Lšžœœœ˜ELšžœœ(œ˜[Lšžœœ"œ˜QLšœE™ELšžœœ"œ˜d˜L™ —šžœœ"œ˜PLšœM™M—L˜Lšœ˜Lšœ˜L˜L˜—…— r;