DIRECTORY Real USING [ LargestNumber ], Imager USING [ Rectangle ], ThreeDBasics USING [ Context, ShapeInstance ]; Interactive3D: CEDAR DEFINITIONS ~ BEGIN Context: TYPE ~ ThreeDBasics.Context; FacingDirection: TYPE ~ {front, back, any}; CloseVertex: TYPE ~ RECORD[ vtx: NAT, shape: REF ThreeDBasics.ShapeInstance ]; CloseVertexSequence: TYPE ~ RECORD[ SEQUENCE length: CARDINAL OF CloseVertex ]; NearbyVertices: PROC[ context: Context, cursorX, cursorY: REAL, numberToReturn: NAT _ 1, maxDistance: REAL _ Real.LargestNumber ] RETURNS[ closeVtx: REF CloseVertexSequence ]; BestPolygon: PROC[ closeVtx: REF CloseVertexSequence, facingDir: FacingDirection _ front, closest: BOOLEAN _ TRUE ]; PasteOn: PROC[ context: Context, viewPort: Imager.Rectangle, action: PROC[Context] ]; RipOff: PROC[ context: Context ]; END. NInteractive3D.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Last Edited by: Crow, September 27, 1986 1:30:39 pm PDT Basic Types Procedures for hit testing Returns the closest displayed vertices up to "numberOfVertices" which lie within "maxDistance" (Manhattan distance) of the screen position given by (cursorX, cursorY) Procedures for erasable drawing Stores pixels underlying viewPort and saves them on context.props to RipOff the area later, if something is already stored on context.props it is RippedOff before action is executed Undoes the last PasteOn Κ˜Iheadšœ™šœ Οmœ1™