DIRECTORY Matrix3d, Vector3d; Clip3d: CEDAR DEFINITIONS ~ BEGIN Pair: TYPE ~ Vector3d.Pair; Triple: TYPE ~ Vector3d.Triple; Quad: TYPE ~ Vector3d.Quad; Matrix: TYPE ~ Matrix3d.Matrix; Alphas: PROC [xp0, xp1: Quad] RETURNS [a0, a1: REAL, off: BOOL]; Frustum: PROC [p0, p1: Triple, m: Matrix] RETURNS [c0, c1: Triple, off: BOOL]; FrustumH: PROC [xp0, xp1: Quad] RETURNS [c0, c1: Triple, off: BOOL]; FrustumD: PROC [xp0, xp1: Quad] RETURNS [c0, c1: Pair, off: BOOL]; NearH: PROC [q0, q1: Quad] RETURNS [c0, c1: Pair, off: BOOL]; END. ψClip3d.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Bloomenthal, September 6, 1986 1:58:27 pm PDT Clipping operations on projected 3d points Clipping is performed using the window edge coordinate algorithm (see Newman and Sproull, 2nd edition). The argument m is the transformation matrix (from object to view space). Clipping is to the viewing frustum: -1.0 <= (x, y, z) <= 1.0; the format ratio is presumed 1.0. Return the parametric points of intersection of line xp0-xp1 with the viewing frustum. Clip the line defined by the two world-space points p0 and p1 after transformation by m against planes: x=w, x=-w, y=w, y=-w, z=0, and z=w; return c0 and c1 set to the new line view-space endpoints; off is true iff the line is totally clipped. Clip the line defined by the two homogeneous points xp0 and xp1. As FrustumClipH except returns pairs. Clip the line segment only at the z=w plane (ie., the eyepoint); thus there is no far clipping and clipping in x and y occurs in Imager. Κf˜šœ ™ Jšœ Οmœ1™