File: SVFacesCast.mesa
Last edited by Bier on June 1, 1984 5:15:14 pm PDT
Copyright © 1984 by Xerox Corporation. All rights reserved.
Author: Eric Bier on July 30, 1984 0:38:12 am PDT
Contents: Routines for finding the intersections of rays (see CSG.mesa) with simple faces (see SVFaces.mesa)
DIRECTORY
SV3d,
SVFaces,
SVRayTypes;
SVFacesCast: DEFINITIONS =
BEGIN
Cone: TYPE = SVFaces.Cone;
Cylinder: TYPE = SVFaces.Cylinder;
DiskRing: TYPE = SVFaces.DiskRing;
EdgeOnRect: TYPE = SVFaces.EdgeOnRect;
Ray: TYPE = SVRayTypes.Ray;
Vector: TYPE = SV3d.Vector;
FaceHitRec: TYPE = REF FaceHitRecObj;
FaceHitRecObj: TYPE = RECORD [
params: ARRAY[1..2] OF REAL,
count: NAT,
normals: ARRAY[1..2] OF Vector];
ConeCast: PROC [cone: Cone, localRay: Ray] RETURNS [hits: FaceHitRec];
DiskRingCast: PROC [diskRing: DiskRing, localRay: Ray] RETURNS [hits: FaceHitRec];
CylinderCast: PROC [cylinder: Cylinder, localRay: Ray] RETURNS [hits: FaceHitRec];
EdgeOnRectCast: PUBLIC PROC [rect: EdgeOnRect, localRay: Ray] RETURNS [hits: FaceHitRec];
GetFaceHitFromPool: PROC RETURNS [faceHit: FaceHitRec];
ReturnFaceHitToPool: PROC [faceHit: FaceHitRec];
END.