INTERFACE EGShade; IMPORT EGScene, H3; FROM EGScene IMPORT TriangleList, MaxLights; PROCEDURE Visible( VAR tri: TriangleList; (* Triangles to paint *) opq: TriangleList; (* Opaque triangles *) READONLY obs: H3.Point; ); (* Given a list "tri" of triangles, replaces it by a list of all parts of those triangles that are not hidden from "obs" by the opaque triangles "opq". The list nodes of "tri" may be reused, and must be disjoint from the list nodes of "opq". *) PROCEDURE Shadow( VAR tri: TriangleList; (* Triangles to illuminate *) opq: TriangleList; (* Opaque triangles *) READONLY lightPos: H3.Point; lightNo: [0..MaxLights-1]; ); (* Given a list "tri" of triangles, splits each element of "sc" into parts that are wholly illuminated or wholly shadowed by the opaque triangles "opq" relative to the given light source. The pieces are returned in "tri", with the illumination field "light[lightNo]" set to TRUE or FALSE, as appropriate. *) PROCEDURE ClipToWindow( VAR sc: TriangleList; (* Scene to clip. *) READONLY w2i: H3.PMap; (* World to Image transform matrix. *) xmin, xmax: REAL; (* Image X range. *) ymin, ymax: REAL; (* Image Y range. *) zmax: REAL; (* Image Z (nearness) range. *) ); (* Given a list of triangles "sc", returns the parts of it that lie inside or on the boundary of the image volume "[xmin__xmax] x [ymin__ymax] x [zmin__zmax]" in the Image coordinate system. *) END EGShade.