DIRECTORY CD, CDBasics, D2Orient; IPOrient: CEDAR DEFINITIONS IMPORTS CDBasics ~ BEGIN Orientation: TYPE = D2Orient.Orientation; ComposeOrient: PROC [itemOrientInCell, cellOrientInWorld: Orientation] RETURNS [itemOrientInWorld: Orientation] ~ INLINE { RETURN[CDBasics.ComposeOrient[itemOrientInCell, cellOrientInWorld]]}; InverseOrient: PROC [orient: Orientation] RETURNS [inverse: Orientation] ~ INLINE { RETURN[CDBasics.InverseOrient[orient]]}; IncludesMirrorX: PROC [orient: Orientation] RETURNS [BOOLEAN] ~ INLINE { RETURN[CDBasics.IncludesMirrorX[orient]]}; IncludesOddRot90: PROC [orient: Orientation] RETURNS [BOOLEAN] ~ INLINE { RETURN[CDBasics.IncludesOddRot90[orient]]}; CDIntToOrien: PUBLIC PROCEDURE[num: INT] RETURNS [orien: CD.Orientation]; CDOrienToInt: PUBLIC PROCEDURE[orien: CD.Orientation] RETURNS [num: INT]; MapPoint: PROC [pointInCell: CD.Position, cellSize: CD.Position, cellInstOrient: Orientation, cellInstPos: CD.Position _ [0,0]] RETURNS [pointInWorld: CD.Position]; OrientD2: PROC [operation: Orientation] RETURNS [INT] ~ INLINE {RETURN[ SELECT operation FROM original => 0, mirrorX => 0, rotate90 => 1, rotate90X => 1, rotate180 => 2, rotate180X => 2, rotate270 => 3, rotate270X => 3, ENDCASE => ERROR] }; END. šIPOrient.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Preas, January 13, 1987 3:02:47 pm PST Implements CD23 CDOrient for Phoenix -- This procedure produces the composite orientation -- obtained by first doing itemInCell and then -- doing cellInWorld. --For all orientationIndexes o1, ComposeOrient[o1, InverseOrient[o1]] = 0. -- returns orient includes some mirroring -- returns orient includes an odd multiple of 90 degree get the CD orientation for a number like CD23 get the number for a CD orientation like CD23 -- Given an point in a prototype cell, -- the size of the prototype cell, both in "cell" co-ordinates, and -- the position and orientation index of an instance of that cell in "world" -- co-ordinates, this procedure returns the world -- co-ordinates of the point. -- WARNING: a position of a rect can not be mapped with MapPoint a flakey procedure; a holdover from CD23 Κ6˜codešœ ™ Kšœ Οmœ1™