<> <> <> <> DIRECTORY SV2d, SV3d, SVMasterObjectTypes, SVSceneTypes; SVObjectCast: CEDAR DEFINITIONS = BEGIN BlockData: TYPE = SVMasterObjectTypes.BlockData; Composite: TYPE = SVSceneTypes.Composite; CSGTree: TYPE = SVSceneTypes.CSGTree; Point2d: TYPE = SV2d.Point2d; Point3d: TYPE = SV3d.Point3d; Primitive: TYPE = SVSceneTypes.Primitive; Surface: TYPE = REF ANY; Vector3d: TYPE = SV3d.Vector3d; RectSurface: TYPE = REF RectSurfaceObj; RectSurfaceObj: TYPE = RECORD [ rectType: RectType]; RectType: TYPE = {up, down, left, right, front, back}; TubeSurface: TYPE = REF TubeSurfaceObj; TubeSurfaceObj: TYPE = RECORD [ ]; DiskSurface: TYPE = REF DiskSurfaceObj; DiskSurfaceObj: TYPE = RECORD [ diskType: DiskType]; DiskType: TYPE = {top, bottom}; ShellSurface: TYPE = REF ShellSurfaceObj; ShellSurfaceObj: TYPE = RECORD [ ]; ConeSurface: TYPE = REF ConeSurfaceObj; ConeSurfaceObj: TYPE = RECORD [ ]; ToroidalSurface: TYPE = REF ToroidalSurfaceObj; ToroidalSurfaceObj: TYPE = RECORD [ ]; ParameterArray: TYPE = SVSceneTypes.ParameterArray; SurfaceArray: TYPE = SVSceneTypes.SurfaceArray; InOutArray: TYPE = SVSceneTypes.InOutArray; NormalArray: TYPE = SVSceneTypes.NormalArray; Classification: TYPE = SVSceneTypes.Classification; Ray: TYPE = SVSceneTypes.Ray; HitRec: TYPE = REF HitRecObj; HitRecObj: TYPE = RECORD [ t: REAL, surf: Surface, normal: Vector3d]; HitArray: TYPE = REF HitArrayObj; HitArrayObj: TYPE = ARRAY[1..globalObjDepth] OF HitRec; globalObjDepth: NAT = 6; <> BlockCast: PROC [localRay: Ray, prim: Primitive, blockRec: BlockData, surfs: SurfaceArray] RETURNS [class: Classification]; SphereCast: PROC [localRay: Ray, thisShell: Surface, prim: Primitive] RETURNS [class: Classification]; CylinderCast: PROC [localRay: Ray, surfaces: SurfaceArray, prim: Primitive] RETURNS [class: Classification]; ConeCast: PROC [localRay: Ray, surfaces: SurfaceArray, prim: Primitive] RETURNS [class: Classification]; ToroidCast: PROC [localRay: Ray, prim: Primitive, torusRec: REF ANY, surface: Surface] RETURNS [class: Classification]; <> END.