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 February 18, 1987 6:26:22 pm PST
Contents: Routines for finding the intersections of rays (see SVRay.mesa) with simple faces (see SVFaces.mesa)
DIRECTORY
SV3d, SVFaces, SVRayTypes;
SVFacesCast: CEDAR DEFINITIONS =
BEGIN
Cone: TYPE = SVFaces.Cone;
Cylinder: TYPE = SVFaces.Cylinder;
DiskRing: TYPE = SVFaces.DiskRing;
EdgeOnRect: TYPE = SVFaces.EdgeOnRect;
Ray: TYPE = SVRayTypes.Ray;
Vector3d: TYPE = SV3d.Vector3d;
FaceHitRec: TYPE = REF FaceHitRecObj;
FaceHitRecObj: TYPE = RECORD [
params: ARRAY[1..2] OF REAL,
count: NAT,
normals: ARRAY[1..2] OF Vector3d];
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.