DIRECTORY Atom, G3dBasic, G3dHierarchy, G3dLight, G3dMatrix, G3dShape, Imager, ImagerPixel, ImagerSample, ImagerColor, IO, Rope, Terminal, ViewerClasses; G3dRender: CEDAR DEFINITIONS ~ BEGIN Error: SIGNAL [code: ATOM, reason: ROPE]; -- we're able to resume this error ROPE: TYPE ~ Rope.ROPE; PropList: TYPE ~ Atom.PropList; Virtual: TYPE ~ Terminal.Virtual; Viewer: TYPE ~ ViewerClasses.Viewer; RefSeq: TYPE ~ REF RefSeqRep; RefSeqRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF REF ]; RealSequence: TYPE ~ G3dBasic.RealSequence; IntegerSequence: TYPE ~ G3dBasic.IntegerSequence; IntSequence: TYPE ~ G3dBasic.IntSequence; NatSequence: TYPE ~ G3dBasic.NatSequence; NatSequenceRep: TYPE ~ G3dBasic.NatSequenceRep; PairSequence: TYPE ~ G3dBasic.PairSequence; IntegerPairSequence: TYPE ~ G3dBasic.IntegerPairSequence; TripleSequence: TYPE ~ G3dBasic.TripleSequence; QuadSequence: TYPE ~ G3dBasic.QuadSequence; RGB: TYPE ~ ImagerColor.RGB; RGBSequence: TYPE ~ REF RGBSequenceRep; RGBSequenceRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF RGB ]; NatRGB: TYPE ~ RECORD [r, g, b: NAT]; NatRGBSequence: TYPE ~ REF NatRGBSequenceRep; NatRGBSequenceRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF NatRGB ]; Spot: TYPE ~ RECORD [ coverage: REAL _ 1.0, -- % of pixel area covered by surface mask: BYTE _ 255, -- code for covered area, default: all covered partShiny: REAL _ 1.0, -- amount shiny surface shows (1.0 = all) val: RealSequence _ NIL, -- interpolated values for shading yIncr: RealSequence _ NIL, -- vertical increments for interpolation xIncr: RealSequence _ NIL, -- horizontal increments for interpolation xySwapped: BOOL, -- if TRUE, xincr and yincr are swapped props: PropList _ NIL -- catchall ]; SpotProc: TYPE ~ PROC [ context: Context, shading: REF ShadingClass, spot: REF Spot, data: REF ANY _ NIL]; PixelPart: TYPE ~ {r, g, b, a, z}; -- addressing within Pixels Pixel: TYPE ~ ARRAY PixelPart OF CARDINAL; -- r, g, b, alpha, z (depth) Pair: TYPE ~ G3dBasic.Pair; IntegerPair: TYPE ~ G3dBasic.IntegerPair; -- RECORD [x, y: INTEGER]; Triple: TYPE ~ G3dBasic.Triple; Quad: TYPE ~ G3dBasic.Quad; -- RECORD [x, y, z, w: REAL]; Matrix: TYPE ~ G3dMatrix.Matrix; -- REF 4 by 4 ARRAY OF REAL MatrixRep: TYPE ~ G3dMatrix.MatrixRep; SampleMap: TYPE ~ ImagerSample.SampleMap; PixelMap: TYPE ~ ImagerPixel.PixelMap; Box: TYPE ~ G3dShape.Box2d; -- [min, max: Pair] Rectangle: TYPE ~ Imager.Rectangle; -- RECORD [x, y, w, h: REAL] ScaleAndAddXfm: TYPE ~ RECORD [scaleX, scaleY, scaleZ, addX, addY, addZ: REAL]; ClipState: TYPE ~ G3dShape.ClipState; -- {in, out, clipped, unknown} OutCode: TYPE ~ RECORD [left, right, bottom, top, near, far: BOOL]; SixSides: TYPE ~ {Left, Right, Bottom, Top, Near, Far}; NoneOut: OutCode ~ [FALSE, FALSE, FALSE, FALSE, FALSE, FALSE]; AllOut: OutCode ~ [TRUE, TRUE, TRUE, TRUE, TRUE, TRUE]; IdentityXfm: ScaleAndAddXfm ~ [1.0, 1.0, 1.0, 0.0, 0.0, 0.0]; TextureStyle: TYPE ~ {none, intensity, color, bump, function}; TextureInfo: TYPE ~ RECORD [name: ROPE, type: TextureStyle, filtered: BOOL]; TextureFunction: TYPE ~ RECORD [name: ATOM, proc: SpotProc, props: PropList]; TextureMap: TYPE ~ RECORD [type: ATOM, pixels: REF ANY, props: Atom.PropList]; SummedTexture: TYPE ~ RECORD [SEQUENCE length: NAT OF REF SumSequence]; SumSequence: TYPE ~ RECORD [SEQUENCE length: NAT OF IntSequence]; CtlPoint: TYPE ~ RECORD [ x,y,z: REAL _ 0.0, -- object coordinates ex, ey, ez: REAL _ 0.0, -- eyespace coordinates sx, sy, sz: REAL _ 0.0, -- screen coordinates clip: OutCode _ NoneOut -- clip code ]; CtlPointSequence: TYPE ~ REF CtlPointSequenceRep; CtlPointSequenceRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF REF CtlPoint ]; Shading: TYPE ~ RECORD [ xn, yn, zn: REAL _ 0.0, -- normal vector to surface exn, eyn, ezn: REAL _ 0.0, -- normal in eyespace r, g, b: REAL _ 1.0, -- vertex color (def = white) scaled by shape color t: REAL _ 1.0, -- original transmittance txtrX, txtrY: REAL _ 0.0, -- texture mapping coordinates er, eg, eb, et: REAL _ 0.0 -- computed color, transmittance (for lights, etc) ]; ShadingSequence: TYPE ~ REF ShadingSequenceRep; ShadingSequenceRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF REF Shading ]; CtlPtInfo: TYPE ~ RECORD [ coord: CtlPoint _ [], shade: Shading _ [], vtxPtr: NAT _ 0, data: REF _ NIL ]; CtlPtInfoSequence: TYPE ~ REF CtlPtInfoSequenceRep; CtlPtInfoSequenceRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF REF CtlPtInfo ]; CtlPtInfoProc: TYPE ~ PROC [context: Context, vtx: CtlPtInfo, data: REF ANY _ NIL] RETURNS [CtlPtInfo]; CtlPtToRealSeqProc: TYPE ~ PROC [dest: RealSequence, source: CtlPtInfo, data: REF _ NIL] RETURNS [RealSequence]; FacingDir: TYPE ~ {front, back, unknown}; Patch: TYPE ~ RECORD [ type: ATOM _ NIL, oneSided: BOOL _ TRUE, nVtces: NAT _ 0, clipState: ClipState _ unknown, dir: FacingDir _ unknown, renderData: REF RenderData, props: PropList _ NIL, ctlPt: SEQUENCE maxLength: NAT OF CtlPtInfo ]; PatchSequence: TYPE ~ REF PatchSequenceRep; PatchSequenceRep: TYPE ~ RECORD [ length: CARDINAL _ 0, element: SEQUENCE maxLength: CARDINAL OF REF Patch ]; PatchProc: TYPE ~ PROC [context: Context, patch: REF Patch, data: REF ANY _ NIL] RETURNS [REF Patch]; Shape: TYPE ~ G3dShape.Shape; ShapeSequence: TYPE ~ G3dShape.ShapeSequence; Hierarchy: TYPE ~ G3dHierarchy.Hierarchy; RenderData: TYPE ~ RECORD [ -- becomes shape.renderData class: REF ShapeClass _ NIL, -- surface type, display procs shadingClass: REF ShadingClass _ NIL, -- shading parameters and procs props: PropList _ NIL, -- catchall ($LinesList, $Hidden) shadingProps: PropList _ NIL, -- shading status and parameters patch: PatchSequence _ NIL, -- built from vertex and surface data patchesValid: BOOL _ FALSE -- FALSE if patches need update ]; ShadingClass: TYPE ~ RECORD [ type: ATOM _ NIL, -- defaults to $Default renderMethod: REF _ NIL, -- RenderStyle or ShapeProc color: RGB _ [0.7, 0.7, 0.7], -- of shape, mixable w/ vertex color diffuseReflectivity: REAL _ 1.0, -- diffuse reflection coefficient specularReflectivity: REAL _ 1.0, -- specular reflection coefficient metallicity: REAL _ 1.0, -- 0 = plastic, 1 = metallic shininess: REAL _ 0.0, -- hilight exp., usu 30-300, (0=none) clientShadingData: REF ANY _ NIL, -- client-defined shading info transmittance: REAL _ 0.0, -- surface transmittance of object texture: LIST OF REF ANY _ NIL, -- textureMap, solid texture, etc. textureScale: Pair _ [1.0, 1.0], -- texture coordinates scale factors bumpScale: REAL _ 1.0, -- scale factor for bump height cnvrtVtx: CtlPtToRealSeqProc _ NIL, -- convert vertex to real sequence getColor: SpotProc _ NIL, -- calculates shade at pixel shadeVtx: CtlPtInfoProc _ NIL -- calculates shade from vertex info ]; ShapeClass: TYPE ~ RECORD [ type: ATOM _ NIL, -- $ConvexPolygon, $Bezier, $Light, etc validate: ShapeProc _ NIL, -- update vertices, shading after change display: ShapeProc _ NIL, -- display shape (speed optimized?) displayPatch: PatchProc _ NIL, -- display patch doBeforeFrame: LIST OF ShapeProc _ NIL -- do before disp. (for animation, etc) ]; ShapeProc: TYPE ~ PROC [context: Context, shape: Shape, data: REF ANY _ NIL] RETURNS [Shape]; Light: TYPE ~ G3dLight.Light; LightSequence: TYPE ~ G3dLight.LightSequence; RenderStyle: TYPE ~ { faceted, smooth, lines, shadedLines, hiddenLines, linesWnormals, controlPoints}; DisplayMode: TYPE ~ {gray, dither, fullColor}; Context: TYPE ~ REF ContextRep; ContextRep: TYPE ~ RECORD [ class: REF ContextClass _ NIL, stopMe: REF BOOL _ NIL, -- stop flag for bailing out (ref for inheritance) imageReady: BOOL _ FALSE, -- flag for useable image in display changed: BOOL _ TRUE, -- call ValidateContext if true clientData: REF ANY _ NIL, -- data storage for a client shapes: ShapeSequence _ NIL, -- current collection of shapes and lights visibleShapes: ShapeSequence _ NIL, -- computed by ValidateContext lightSources: LightSequence _ NIL, -- computed by ValidateContext hierarchy: Hierarchy _ NIL, -- shapes organized in a tree hierarchy frameNumber: NAT _ 0, -- current frame for animation routines environment: PropList _ NIL, -- for reflection map, ambient light proc, etc. eyePoint: Triple _ [1.0, -5.0, 2.0], -- defines point from which view is seen lookAt: Triple _ [0.0, 0.0, 0.0], -- defines center of image and focus rollAngle: REAL _ 0.0, -- rotational angle about direction of view upDirection: Triple _ [0.0, 0.0, 1.0], -- defines "heads-up" direction (redundant) fieldOfView: REAL _ 40.0, -- horizontal angle included in field of view window: REF Rectangle _ NIL, -- window clips field of view in eyespace hitherLimit: REAL _ 1.0, -- anything closer to eyepoint is clipped yonLimit: REAL _ 1000.0, -- anything further from eyepoint is clipped clippingPlanes: ARRAY SixSides OF Quad, -- computed clip planes eyeSpaceXfm: Matrix _ NIL, -- world space to eyespace eyeToNdc: ScaleAndAddXfm _ IdentityXfm, -- eyespace to normalized disp. coords ndcToPixels: ScaleAndAddXfm _ IdentityXfm, -- to screen coords viewer: Viewer, -- viewer record if in Viewer ELSE NIL terminal: Virtual _ NIL, -- virtual terminal for this context, if displayed displayInValid: BOOL _ TRUE, -- true whenever display parameter updated pixels: PixelMap _ NIL, -- where the bits are pixelAspectRatio: REAL _ 1.0, -- physical width/height of displayed pixel viewPort: REF Rectangle _ NIL, -- viewport in floating pt. display coordinates preferredViewPort: Rectangle _ [0., 0., 65536., 65536.], -- maximum viewport size screenExtent: Box _ [[0, 0], [0, 0]], -- bounds area used (while building image) preferredRenderMode: ATOM _ NIL, -- $Pixels, $Imager (fancy vs. device indep.) displayProps: PropList _ NIL, -- $Depth, $Alpha (Pixel posn), -- $FullDisplayMemory, $ViewerAdjusted autoRedraw: BOOL _ FALSE, -- quick image hint, redraw if viewer changes delayClear: BOOL _ FALSE, -- delay clearing buffer when rendering doVisibly: BOOL _ TRUE, -- build image on display antiAliasing: BOOL _ FALSE, -- flag for antialiasing and alpha buffer depthBuffering: BOOL _ FALSE, -- buffer for cheap hidden-surface removal depthResolution: NAT _ 8192, -- number of buckets for depth sorting sortSequence: REF _ NIL, -- shapes or surfaces sorted for display props: PropList _ NIL -- catchall, global uses: ]; ContextClass: TYPE ~ RECORD [ displayType: ATOM _ NIL, -- includes: setUpDisplayType: ContextProc, -- ensures there are bits to write, sets up colors validateDisplay: ContextProc, -- makes sure viewPort changes, etc. take effect render: ContextProc, -- call this to display the scene loadBackground: ContextProc, -- clear to background draw2DLine: PROC [context: Context, p1, p2: Pair, color: Pixel], -- display a line draw2DPolygon: PROC [context: Context, poly: PairSequence, color: Pixel], draw2DRope: PROC [context: Context, rope: ROPE, position: Pair, color: Pixel _[255,255,128,0,0], size: REAL _20, font: ROPE _NIL], displayPolygon: PatchProc, -- 3 dimensional shading drawInViewer: PROC [context: Context, procRec: REF ImagerProcRec], updateViewer: ContextProc ]; ContextProc: TYPE ~ PROC [context: Context, data: REF ANY _ NIL]; ImagerProc: TYPE ~ PROC [context: Context, imagerCtx: Imager.Context, data: REF _ NIL]; ImagerProcRec: TYPE ~ RECORD [proc: ImagerProc, data: REF ANY _ NIL]; RopeProc: TYPE ~ PROC [ context: Context, rope: ROPE, position: Pair, color: Pixel _ [255, 255, 255, 0, 0], size: REAL _ 20, font: ROPE _ NIL]; RegisterDisplayClass: PROC [class: ContextClass, type: ATOM]; GetDisplayClass: PROC [type: ATOM] RETURNS [class: ContextClass]; LoadDisplayClass: PROC [context: Context, type: ATOM]; RegisterShapeClass: PROC [class: ShapeClass, type: ATOM]; GetShapeClass: PROC [type: ATOM] RETURNS [class: ShapeClass]; LoadShapeClass: PROC [shape: Shape, type: ATOM]; Create: PROC RETURNS [Context]; CreateUndisplayedContext: PROC [ oldContext: Context _ NIL, width: NAT _ 1024, height: NAT _ 768, displayMode: DisplayMode _ fullColor, keepLog: BOOL _ FALSE] RETURNS [context: Context]; InitializeRawColorDisplayContext: PROC [ antiAliasing: BOOL _ TRUE, background: RGB _ [0.2, 0.2, 0.7], displayMode: DisplayMode _ gray] RETURNS [context: Context]; StoreImage: PUBLIC PROC [ context: Context, fileName: ROPE, sequenceNo: NAT _ LAST[NAT], log: BOOL _ FALSE, abekasFormat: BOOL _ FALSE]; CloseDisplay: PROC [context: Context]; CloseColorViewers: PROC; KillUntitledColorViewers: PROC; GetTmpContext: PUBLIC PROC [srcCtx: Context] RETURNS[dstCtx: Context]; CopyContextData: PUBLIC PROC [dstCtx, srcCtx: Context]; CopyContextShapes: PUBLIC PROC [dstCtx, srcCtx: Context]; SetViewFromParameters: PROC [ context: Context, fieldOfView: REAL _ 40.0, scale: REAL _ 1.0, moves, rotates: Triple _ []]; SetView: PROC [ context: Context, eyePoint: Triple, lookAt: Triple, fieldOfView: REAL _ 40.0, rollAngle: REAL _ 0.0, upDirection: Triple _ [0., 0., 1.], hitherLimit: REAL _ .01, yonLimit: REAL _ 1000.0]; SetViewPort: PROC [context: Context, size: Rectangle]; SetWindow: PROC[context: Context, size: Rectangle]; SetAmbientLight: PROC [context: Context, rgb: RGB]; NameAmbientLight: PROC [context: Context, color: ROPE]; GetAmbientLight: PROC [context: Context] RETURNS [RGB]; AddLight: PROC [ context: Context, name: ROPE, position: Triple, color: RGB _ [1, 1, 1], type: ATOM _ $Default]; DeleteLight: PROC [context: Context, name: ROPE]; DeleteAllLights: PROC [context: Context]; LightsFromContext: PROC [context: Context] RETURNS [LightSequence]; LightsToContext: PROC [lights: LightSequence, context: Context]; NameBackgroundColor: PROC [context: Context, color: ROPE]; SetBackgroundColor: PROC [context: Context, color: RGB]; GetBackgroundColor: PROC [context: Context] RETURNS [color: RGB]; SetBackgroundImage: PROC [context: Context, aisFile: ROPE]; GetBackgroundImage: PROC [context: Context] RETURNS [ROPE]; SetBackgroundContext: PROC [context, bkGrdCtx: Context]; EnableClear: PROC [context: Context, on: BOOL]; DontMatteBackground: PROC [context: Context]; AddShape: PROC [context: Context, shape: Shape]; AddShapeFromFile: PROC [ context: Context, shapeName: ROPE, fileName: ROPE, position: Triple _ [0.0, 0.0, 0.0]]; FindShape: PROC [context: Context, shapeName: ROPE] RETURNS [Shape]; ShapeFromRope: PROC [ name: ROPE _ NIL, message: ROPE, color: ROPE _ NIL, size: REAL _ 0.5, font: ROPE _ NIL] RETURNS [Shape]; ChangeRopeMessage: PUBLIC PROC [context: Context, shapeName: ROPE, newMessage: ROPE]; DeleteShape: PROC [context: Context, shapeName: ROPE]; DeleteAllShapes: PROC [context: Context]; SetRenderStyle: PROC [shape: Shape, renderStyle: RenderStyle]; SetDiffuse: PROC [shape: Shape, diffuseReflectivity: REAL]; SetSpecular: PROC [shape: Shape, specularReflectivity: REAL]; SetMetallicity: PROC [shape: Shape, metallicity: REAL]; SetShininess: PROC [shape: Shape, shininess: REAL]; SetColor: PROC [shape: Shape, color: RGB]; SetTransmittance: PROC [shape: Shape, transmittance: REAL]; SetInvisible: PROC [shape: Shape]; SetVisible: PROC [shape: Shape]; ShowBackfaces: PROC [shape: Shape]; HideBackfaces: PROC [shape: Shape]; AddAxes: PROC [ context: Context, origin: Triple _ [0, 0, 0], size: REAL _ 1.0, scale: Triple _ [1, 1, 1], nReticles: NAT _ 20]; RenderDataFrom: PROC [shape: Shape] RETURNS [REF RenderData]; ShapeClassFrom: PROC [shape: Shape] RETURNS [REF ShapeClass]; ShadingClassFrom: PROC [shape: Shape] RETURNS [REF ShadingClass]; PatchesFrom: PROC [shape: Shape] RETURNS [PatchSequence]; SetTextureMap: PROC [ context: Context, shapeName: ROPE, aisName: ROPE, textureStyle: TextureStyle _ intensity, textureFiltering: BOOL _ FALSE] RETURNS [error: ROPE]; OffsetTextureCoords: PROC [shape: Shape, offset: Pair]; GetTextureInfo: PROC [shape: Shape] RETURNS [LIST OF TextureInfo]; ScaleTexture: PROC [context: Context, shape: Shape, scale: Pair]; SetTextureScale: PROC [shape: Shape, scale: Pair _ [1.0, 1.0]]; GetTextureScale: PROC [shape: Shape] RETURNS [Pair _ [1.0, 1.0]]; SetTextureRange: PROC [shape: Shape, textureRange: Pair]; SetTextureFiltering: PROC [context: Context, shape: Shape, on: BOOL]; GetBumpScale: PROC [shape: Shape] RETURNS [REAL]; SetBumpScale: PROC [shape: Shape, scale: REAL _ 1.0]; StartLog: PROC [context: Context] RETURNS[IO.STREAM]; FlushLog: PROC [context: Context]; CloseLog: PROC [context: Context]; Render: PROC [context: Context, fork: BOOL _ TRUE]; RendertoAISFile: PROC [context: Context, name: ROPE, fork: BOOL _ TRUE]; WaitTilRenderDone: PROC; NotRendering: PROC [context: Context] RETURNS [BOOL]; AbortRender: PROC [context: Context]; GetDisplayMode: PROC [context: Context] RETURNS [DisplayMode]; SetAntiAliasing: PROC [context: Context, on: BOOL _ TRUE]; AntiAliasingNeeded: PROC [context: Context] RETURNS [BOOL]; GetBuffer: PROC [context: Context, type: ATOM] RETURNS [SampleMap]; GetAlphaBuffer: PROC [context: Context] RETURNS [SampleMap]; GetDepthBuffer: PROC [context: Context] RETURNS [SampleMap]; PrependWorkingDirectory: PROC [context: Context, file: ROPE] RETURNS [ROPE]; TackOnExtension: PROC [file, extension: ROPE] RETURNS [ROPE]; GetLogFileName: PUBLIC PROC[fileRoot: Rope.ROPE] RETURNS[Rope.ROPE]; PasteInSequenceNo: PUBLIC PROC[fileRoot: Rope.ROPE, number: NAT] RETURNS[Rope.ROPE]; PasteInLabel: PROC[fileRoot: Rope.ROPE, label: Rope.ROPE] RETURNS[Rope.ROPE]; IntersectRectangles: PROC [Rectangle, Rectangle] RETURNS [Rectangle]; AtomFromTextureStyle: PROC [textureStyle: TextureStyle] RETURNS [ATOM]; AtomFromDisplayMode: PROC [displayMode: DisplayMode] RETURNS [ATOM]; RopeFromDisplayMode: PROC [displayMode: DisplayMode] RETURNS [ROPE]; RopeFromRenderStyle: PROC [renderStyle: RenderStyle] RETURNS [ROPE]; RopeFromTextureStyle: PROC [textureStyle: TextureStyle] RETURNS [ROPE]; END. œG3dRender.mesa Copyright Σ 1985, 1989 by Xerox Corporation. All rights reserved. Bloomenthal, September 18, 1989 6:47:50 pm PDT Crow, September 21, 1989 4:20:01 pm PDT Glassner, July 19, 1989 12:04:39 pm PDT Errors Types Miscellaneous Types Imported Sequences Pixel Definitions Geometric Definitions Image Definitions Constants Texture Definitions Control Point Definitions Patch Definitions Implemented patch types: $ConvexPolygon, $Bezier; props usage: $Shape (parent shape) Shape Definitions Uses for RenderData.props: $ClippedPatches, $ClippedVertices, $Hidden, $LinesList, Uses for RenderData.fixedProps: $Closed, $PatchColors, $PatchColorsInFile, $PatchInfo, $PatchNormalsInFile, $PatchTransmittancesInFile, $VertexColorsInFile, $VertexNormalsInFile, $VertexTextureInFile, $VertexTransmittanceInFile Uses for RenderData.shadingProps: $AuxiliaryVtxData, $PolygonInfoComputed, $Scale, $ShapeLerp, $TextureScale, $TxtrCoordParams, $TxtrCoordRange, $TxtrCoordType, $TxtrTranslation, $VtxInfoComputed Light Definitions Context Definition Miscellany Scene description View description Display description Rendering Style $WDir - working directory $Log - log file for messages $BackGround - background color or context (images) $DitherContext - for dithering RGB to pseudocolor $OutputFile - output file for interpress or animation $ImagerCtx - context for Imager calls, if no viewer $SortToPriority - forces priority sort, poly intersections $PseudoColor, $Gray, $FullColor, $ImagerGray $ImagerDithered, $ImagerFullClr, $Bitmap, $Interpress 2d drawing primitives use normalized display coordinates (-1.0 < x < 1.0, -.75 < y < .75) Classes Registration Add class to list of registered ContextClasses, containing display-specific procs, etc. Retrieve registered class for use or modification. Set proper color map and rendering procs. Add class to list of registered ShapeClasses, containing surface-specific procs, etc. Retrieve registered class for use or modification. Load ShapeClass (patch expansion and rendering procs) and ShadingClass for surface type. Context Allocate a context. Return a context with memory allocated for the indicated number of pixels. If oldContext is not NIL then copy existing scene, background, lights, etc. from it, otherwise initialize context to standard defaults and set RGB background to [0.2, 0.2, 0.7]. Return an initialized Context (one light source, nominal viewpoint). This call will utilize the entire color display without the Viewers mechanism. Store the image last computed by the context to the file indicated. A sequence number may be specified if the image is a frame from an animation. If abekas true, then RGB (Abekas) format is written to the file. If log, then a message is appended to the log file (named .log). Shut down display gracefully, restore standard color map. Close any open viewers on the color display. Kill any untitled color viewers (presumably the unwanted G3dRender viewer). Copies context so temporary modifications can be made (don't change shapes however. Copies REFed data to dstCtx to insulate srcCtx from changes (except for shapes). Copies shape data to dstCtx to insulate srcCtx shapes from changes. View Set the context view according to parameters. If fieldOfView = 0, it will be set to 40. Set the context view according to camera geometry. If fieldOfView = 0, it will be set to 40. Display full image (with possibly diferent aspect ratio) in portion of screen. Display only that part of full-screen image which lies within the window. Lighting Set the ambient lighting for context. Set ambient light color using color naming scheme. Return the ambient lighting for context. Install a new light source in the scene, or change a previously named one. Remove an existing light source from the scene. Remove all existing light sources from the scene. Create a light sequence from those context shapes that are lights. Set the context lights. Background Set background color using color naming scheme. Set background color. Return the background for context. Use named AIS file as background image for scene instead of solid color. Return the name of the background image (NIL if none). Use named 3d context as background image for scene (contexts may be stacked arbitrarily). Enable clearing before rendering; if disabled (on = FALSE) images may be composited using successive renderings. Prevents final background matte step thereby preserving alpha buffer. Shapes Add a shape to the context. Convenience function for reading in a shape from a file and positioning it in a scene; clones previously read shape if file has been used before. Return the named shape; raises SIGNAL $MisMatch if shape not found. Build a shape to display a message within the scene. Shape is two-dimensional, always facing the eyepoint, but changes in size with perspective. Changes the message displayed for a rope shape. Removes a shape from a context. Delete all shapes (whose name does not begin with "Light") from context. Change the rendering style for a shape. Set the shape's diffuse reflection. Set the shape's specular reflection. Set the shape's metallicity. Set the shape's shininess. Set the color for the given shape. Change the transmittance of the shape; transmittance = 0 is opaque. N.B: Rendering of transparent objects occurs only when anti-aliasing is enabled. Maintain data but don't display the shape. Undo SetInvisible. Render back-facing polygons (for transparent or non-closed shapes, or debugging). Don't render back-facing polygons (for transparent or non-closed shapes, or debugging). Add a set of coordinate axes to the 3d context. size is the length of an axis; the scales are the numeric size of each axis. Internal Shape Structures for Rendering Return the renderData for this shape. Return the shapeClass for this shape. Return the shadingClass for this shape. Get shape.renderData.patch, the patch-by-patch description, of the surface, conveniently. Textures Read in the appropriate texture map for the given shape. Uses summed area tables if textureFiltering, else point sampling. Offset the texture coordinates for the given shape. Return a list of texture information associated with the shape. Scale the texture coordinates associated with shape. Set the texture scale for the given shape. Return the texture scale for the given shape. Permits circumvention of seam matching in G3dMappedAndSolidTexture.AdjustTexture. textureRange should exceed twice the texture range for all polygons in shape. Turn on/off the texture filtering for the given shape. Return the bump scale factor for the given shape. Set the bump scale factor for this shape. Rendering Open typescript log. For safety from potential disasters. Close when done to flush. Perform the rendering process. Render and then store as indicated AIS file Wait until a rendering process finishes. Return true iff context is not forked or not rendering. Abort any current rendering within context. Return the display mode. This will draw images using the alpha buffer; texture mapping is enabled. Determine if anti-aliasing is needed to render the shapes in their respective shading modes. For example, anti-aliasing is necessary for bump-mapping, transparency, solid texture. Get a sample map from the context; returns NIL if no such map. Get the alpha buffer from the context; returns NIL if no such buffer. Get the depth buffer from the context; returns NIL if no such buffer. Miscellany Prepend working directory saved in context to the given file name, if the file name is local. Append extension to the file name. Gets name of log file for updating animation status Adds sequence number to file root name, just before extension, for animations Puts supplied label before file name extension, for adding "-red, -grn, -blu" etc. Return intersection (overlapping) portion of combined rectangles. Return an atom for non-typed operations. Return an atom for non-typed operations. Return the rope representing displayMode. Return the rope representing renderStyle. Return the rope representing textureStyle. Κ ˜™J™BJšœ.™.Icodešœ'™'K™'J˜JšΟk œnœ ˜™J˜—šΡbln œœ ˜Jšœ˜—headšΟl™Jš Οnœœœ œΟc"˜P—šŸ™šŸ™Jšœœœ˜Jšœ œ˜"Jšœ œ˜$Jšœ œ˜'Jšœ œœ ˜ šœ œœ˜Jšœ œ˜Jšœœ œœ˜1J˜——šŸ™Jšœœ˜,Jšœœ˜2Jšœœ˜,Jšœœ˜+Jšœœ˜0Jšœœ˜,Jšœœ ˜9Jšœœ˜0Jšœœ˜,—šŸ™Jšœœœ˜!Jšœœœ˜(šœœœ˜Jšœ œ˜Jšœœ œœ˜1J˜J˜—Jšœ œœ œ˜(Jšœœœ˜.šœœœ˜"Jšœ œ˜Jšœœ œœ˜4J˜J˜—šœ œœ˜Jšœœ ‘%˜CJšœ œ ‘Πcs‘’‘’‘’‘’‘’‘˜HJšœœ ‘)˜FJšœœ‘"˜AJšœœ‘(˜IJšœœ‘*˜KJšœœ‘’‘˜@Jšœœ‘ ˜(J˜—šœ œœ˜J˜Jšœœ˜Jšœ œ˜Jšœ œœœ˜J˜—Jšœœ‘˜FJš œ œœ œœ‘˜L—šŸ™Jšœ œ˜Jšœœ‘’‘’‘˜IJšœ œ˜"Jšœ œ‘’‘’‘˜BJšœ œ‘’˜EJšœ œ˜(—šŸ™Jšœ œ˜+Jšœ œ˜)JšΟtœœ£Πct‘˜7š œœ £œ £€’‘’‘˜GJ˜—šœœœ,œ˜PJ˜—Jšœœ‘˜JJšœ œœ'œ˜FJšœ œ)˜:—šŸ ™ Jš œœœœœœœ˜AJš œœœœœœœ˜:J˜?—šΠblŸ ™Jšœœ,˜@Jš œ œœœ œ˜NJšœœœœ#˜MJš œœœœ œœ˜PJš œœœœ œœœ˜HJš œœœœ œœ˜B—š₯™šœ œœ˜Jšœ œ ‘˜3Jšœœ ‘˜8Jšœœ ‘˜6Jšœ‘ ˜+J˜J˜—Jšœœœ˜1šœΟsœœ˜$Jšœ œ˜Jš œœ œœœ ˜:J˜J˜—šœ œœ˜Jšœœ‘˜7Jšœœ‘˜4Jšœœ‘ ’‘’‘’‘’‘’‘’‘’‘˜MJšœ œ‘˜/Jšœœ‘˜Jšœ$œ‘"˜KJšœœ‘˜>Jšœœ‘$˜IJ˜J˜—šœœœ˜Jš œ œœ‘’‘’‘’‘˜BJš œœ‘ ’‘ ’‘’‘’‘˜IJšœœ‘#˜CJšœœ‘˜5Jšœœœ œ‘’‘’‘’‘’‘ ’‘˜QJ˜—š œ œœ(œœœ˜NJšœœ ˜——š₯™Jšœ œ˜!Jšœœ˜.—š₯™šœ œ˜šœP˜PJ˜——šœ Πksœ˜.J˜—Jšœ œœ ˜ šœ œœ˜šΟb ™ Jšœ œœ˜!Jšœ œœœ‘2˜NJšœ œœ‘%˜BJšœ œœ‘#˜:Jšœ œœœ‘˜:—š¨™Jšœœ‘*˜JJšœ œ‘˜CJšœœ‘˜BJšœœ‘'˜EJšœœ ‘'˜BJšœœ‘0˜P—š¨™Jšœ'‘(˜OJšœ%‘$˜IJšœ œ ‘+˜GJšœ)‘+˜TJšœœ ‘-˜KJšœ œ œ‘)˜IJšœœ ‘)˜GJšœ œ ‘,˜IJšœœ œ‘˜@Jšœœ‘˜8Jšœ*‘&˜PJšœ-‘˜@—š¨™Jšœ‘¦’¦˜=Jšœœ‘2˜PJš œœœ‘Πci‘© ‘˜KJšœœ‘˜5Jšœœ ‘+˜LJšœ œ œ‘/˜PJšœ9‘˜QJšœ&‘,˜RJšœœœ‘.˜QJšœœ‘!œ‘(˜|—š¨™Jšœœœ‘-˜KJšœœœ‘'˜EJšœ œœ‘˜5Jšœœœ‘)˜HJšœœœ‘*˜JJšœœ‘&˜IJšœœœ‘(˜Ešœœ‘˜4J™%J™)J™J™D——J˜J˜—šœœœ˜šœœœ‘ ˜(J™J™J™J™J™J™J™J™—Jšœ!‘2˜SJšœ ‘0˜PJšœ‘!˜:Jšœ‘˜5J™ZJšœœ1‘˜TJšœœ6˜Jšœœœ˜BJš œ¦œ'œ œœ˜K—Jšœ%‘˜>Jšœœœ˜CJ˜J˜—Jš œœœœœœ˜BJš œ œœ5œœ˜Xš œœœœœœ˜EJ˜—šœ œœ˜Jšœ˜Jšœ œ˜Jšœ˜Jšœ,˜,Jšœ œ˜Jšœ œœ˜———š₯™š œœœ˜=J™X—š œœœœ˜AJ™3—š œœœ˜6J™*—š œœœ˜9J™V—š  œœœœ˜=J™3—š œœœ˜0J™X——š₯™š œœœ ˜J™—š œœ˜ Jšœœ˜Jšœœ ˜Jšœœ˜Jšœ%˜%Jšœ œœ˜Jšœ˜JšœJ™JJšœ¦œ<™TJšœ\™\J™—š  œœ˜(Jšœœœ˜Jšœ œ˜"J˜ Jšœ˜J™DJ™NJ™—š  œœœ˜Jšœ˜Jšœ œ˜Jšœ œœœ˜Jšœœœ˜Jšœœœ˜JšœC™CJšœM™MJšœ¦œ(™@J™OJ™—š  œœ˜&J™9J™—šΠbnœœ˜J™,J™—š œœ˜JšœK ™L—aš  œœœœ˜FM™SM˜—š œœœ˜7MšœR™R—š œœœ˜9MšœC™C——šŸ™š œœ˜J˜Jšœ œ˜Jšœœ˜J˜J™XJ˜—š œœ˜J˜J˜J˜Jšœ œ˜Jšœ œ˜J˜$Jšœ œ˜Jšœ œ ˜J™]J™—š  œœ%˜6J™O—š  œœ$˜3J™I——šŸ™š œœœ˜3J™%J™—š œœœ˜7J™3—š œœœœ˜7J™(J™—š œœ˜Jšœœœœ ˜_J™K—š  œœœ˜1J™/J™—š œœ˜)J™1J™—š œœœ˜CK™BK™—š œœ+˜@K™——šŸ ™ š œœœ˜:J™0—š œœœ˜8J™—š œœœ œ˜AJ™#—š œœœ˜;Jšœ œ<™I—š œœœœ˜;Jšœ)¦œ ™6J™—š œœ˜8J™YJ™—š  œœœ˜/J™pJ™—š œœ˜-J™E——šŸ™š œœ#˜1J™—š œœ˜J˜Jšœ œ˜Jšœ œ˜J˜%J™VJ™;—š  œœœœ ˜DJšœ¦œ™CJ™—š  œœ˜Jšœœœ˜Jšœ œ˜Jšœœœ˜Jšœœ˜Jšœœœ˜Jšœ ˜J™4J™\J˜—š  œœœœœ˜UJ™1—š  œœœ˜6J™ —š œœ˜)J™HJ™—š œœ*˜>J™'J™—šͺ œ¦œ%œ˜;Jšœ#™#J™—šͺ œ¦œ&œ˜=Jšœ$™$J™—šͺœ¦œœ˜7Jšœ™J™—šͺ œ¦œœ˜3J™J™—š œœœ˜*J™"J™—š œœœ˜;J™CJš¨ͺ¨œL™PJ™—š  œœ˜"Jšœ*™*J™—š  œœ˜ J™J™—š  œœ˜#J™QJ™—š  œœ˜#J™WJ™—š œœ˜Jšœ˜Jšœ˜Jšœœ˜Jšœ¦œ ˜Jšœ œ˜J™/J™L——š₯'™'defaultš œœœœ ˜=N™%N˜—š œœœœ ˜=N™%N™—š œœœœ˜AN™(—š  œœœ˜9JšœY™Y——šŸ™š  œœ˜J˜Jšœ œ˜Jšœ œ˜J˜'Jšœœœ˜Jšœ œ˜J™8J™AJ™—š œœ˜7J™3J™—š  œœœœœ˜BJ™?J™—š  œœ/˜AJ™4J™—š œœ*˜?J™*J™—š œœœ˜AJ™-J™—š œœ$˜9J™QJ™MJ™—š œœ&œ˜EJ™6J™—š  œœœœ˜1J™1J™—š  œœœ˜5J™)——šŸ ™ š  œœœœœ˜5Mš‘™M™—š œœ˜"Mšœ$™$Mšœ™—š œœ˜"M™M™—š œœœœ˜3J™J™—š  œœœœœ˜HJ™-—š œœ˜J™(J˜—š  œœœœ˜5J™7J™—š  œœ˜%J™+J™—š œœœ˜>J™J™—š œœœœ˜:J™IJ™—š œœœœ˜;J™\J™VJ™—š  œœœœ ˜CJšœ+¦œ™>J™—š œœœ ˜