Tilers.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Last Edited by: Crow, October 3, 1986 2:36:21 pm PDT
Bloomenthal, January 19, 1987 5:38:58 pm PST
DIRECTORY
ScanConvert    USING [Spot],
ThreeDBasics   USING [Context, VertexInfo, RealSequence],
ThreeDSurfaces   USING [Patch];
Tilers: CEDAR DEFINITIONS
~ BEGIN
Types
TilersError: SIGNAL [reason: ATOM];
VertexInfo: TYPE ~ ThreeDBasics.VertexInfo;
Patch: TYPE ~ ThreeDSurfaces.Patch;
LerpVtx: TYPE = RECORD [
x, y: REAL,
val: REF ThreeDBasics.RealSequence
];
LerpVtxSequence: TYPE ~ RECORD [
length: NAT,
s: SEQUENCE maxLength: NAT OF REF LerpVtx
];
FancyPatch: TYPE = RECORD [
recurseLevel: NAT ← 0,
spot: ScanConvert.Spot,    -- [x, y, coverage, mask, val, yIncr, xIncr, props, proc],
vtx: SEQUENCE length: NAT OF LerpVtx
];
Utility procedures
AddHighlight: PROC[spot: ScanConvert.Spot] RETURNS[ScanConvert.Spot];
Simple Polygon Tilers
 Call point for discriminating among tilers
PolygonTiler: PROC[context: REF ThreeDBasics.Context, poly: REF Patch];
for quick display with faceted shading
ConstantTiler: PROC[context: REF ThreeDBasics.Context, poly: REF Patch];
for fairly quick display with Gouraud shading
SmoothTiler: PROC[context: REF ThreeDBasics.Context, poly: REF Patch];
for Highlights with Phong shading
ShinyTiler: PROC[context: REF ThreeDBasics.Context, poly: REF Patch];
PhongShadeAllPolygons: PROC;
If ShinyTiling, then phong shade all polygons, whether with or without highlights.
PhongShadeOnlyHighLightedPolygons: PROC;
If ShinyTiling, then phong shade only polygons with highlights. This is the default.
Fancy Polygon Tilers
for Anti-aliasing, texture, etc.
FancyTiler: PROC[context: REF ThreeDBasics.Context, poly: REF Patch];
recursive implementor of tiler
RealFancyTiler: PUBLIC PROC[context: REF ThreeDBasics.Context, poly: REF FancyPatch];
END.