DIRECTORY Controls, Draw2d, G3dBasic, G3dControl, G3dLight, G3dMatrix, G3dModel, G3dRayTrace, G3dShape, G3dTool, Imager, IO, Rope, ViewerClasses; G3dRayTraceTool: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; ButtonList: TYPE ~ Controls.ButtonList; ControlList: TYPE ~ Controls.ControlList; OuterData: TYPE ~ Controls.OuterData; Typescript: TYPE ~ Controls.Typescript; Viewer: TYPE ~ Controls.Viewer; DrawProc: TYPE ~ G3dTool.DrawProc; Ray: TYPE ~ G3dBasic.Ray; Triple: TYPE ~ G3dBasic.Triple; CameraControl: TYPE ~ G3dControl.CameraControl; Matrix: TYPE ~ G3dMatrix.Matrix; RayData: TYPE ~ G3dRayTrace.RayData; RayProc: TYPE ~ G3dRayTrace.RayProc; Client: TYPE ~ G3dTool.Client; Context: TYPE ~ Imager.Context; Tool: TYPE ~ REF ToolRep; ToolRep: TYPE ~ RECORD [ tool3d: G3dTool.Tool ¬ NIL, rayData: RayData ¬ NIL, -- ray tracing mechanism showRays: BOOL ¬ TRUE -- show rays on the line-drawing ]; MakeTool: PROC [ toolName: ROPE ¬ NIL, -- name of the tool rayProc: RayProc ¬ NIL, -- position of the eye client: Client ¬ [], extraControls: ControlList ¬ NIL, -- in addition to the standard set extraButtons: ButtonList ¬ NIL] -- in addition to the standard set RETURNS [Tool]; RayTraceOptions: PROC [ r: RayData, ts: Typescript, rayTraceProc: PROC [clientData: REF ANY] ¬ NIL, clientData: REF ANY ¬ NIL]; Repaint: PROC [tool: Tool, whatChanged: REF ANY ¬ NIL]; END. ° G3dRayTraceTool.mesa Copyright Σ 1985, 1992 by Xerox Corporation. All rights reserved. Bloomenthal, October 20, 1992 5:24 pm PDT Glassner, March 15, 1989 6:46:10 am PST Imported Types Local Types 3d Tool: Ray-Tracing: Diagnostics: RayTool Creation The ray-traced image is shown on the color display. rayProc is called with a unit length ray. The standard set of controls includes: X x-position of the camera Y y-position of the camera Z z-position of the camera Scale scale of the camera XRot x-rotation of the camera YRot y-rotation of the camera ZRot z-rotation of the camera Fov field-of-view of the camera The camera provides a view of the ray tracing world, including the object being ray-traced, the image plane, the eye-point and eye-direction, and, optionally, individual rays. The standard set of buttons includes: Start Begin or resume ray-tracing Stop Suspend ray-tracing Reset Reset the pixel index to the beginning of the frame Display Options Select from various display/diagnostic options Parameters Set such parameters as image width and height and ray-mode Eye Set the position of the eye View Set the view direction of the eye Up Set the up direction relative to the view direction Fov Set the image field-of-view Tool Options Choose from a pop-up menu to alter any of the following: ray mode, image width, image height, eye point, eye view, up direction, field of view as well as reset the ray-tracing pixel or set the line-drawing to be the ray trace view. ts is used to query the user. If the Ray-Trace option is selected, rayTraceProc is called with clientData. Tool Display Repaint the graphics viewer associated with the tool. Κα–"cedarcode" style•NewlineDelimiter ™™Jšœ Οeœ6™BJ™)™'J˜—JšΟk œpžœ˜‘J˜—šΠblœžœž ˜"J˜—Jšœž˜headšΟl™Jšžœžœžœ˜Jšœ žœ˜(Jšœ žœ˜*Jšœ žœ˜&Jšœ žœ˜(Jšœ žœ˜!Jšœ žœ˜#Jšœžœ˜Jšœ žœ˜!Jšœžœ˜/Jšœ žœ˜"Jšœ žœ˜&Jšœ žœ˜&Jšœ žœ˜ Jšœ žœ˜!—š  ™ Jšœžœžœ ˜šœžœžœ˜™Jšœžœ˜—™ JšœžœΟc˜5—™ Jšœ žœžœ‘ ˜:—J˜——š ™šΟnœžœ˜Jšœ žœžœ‘˜0Jšœžœ‘˜4J˜Jšœžœ‘"˜GJšœžœ‘"˜FJšžœ ˜J˜J™3™)J™—™&J™J™J™J™J™ J™ J™ J™"—™°J™—™%J™$J™J™J™FJ™"J™)J™9J™"———š  ™ š’œžœ˜Jšœ ˜ Jšœ˜Jš œžœžœžœžœ˜/Jšœ žœžœžœ˜™8J™UJ™X—J™J™L——š  ™ š ’œžœžœžœžœ˜7J™5—J™—Jšžœ˜J˜—…—’3