DIRECTORY Graphics, IO, ObjectCast, Rope, SV2d, SVModelTypes, SVRayTypes, SVSceneTypes, SweepGeometry; BasicObject3d: DEFINITIONS = BEGIN Assembly: TYPE = SVSceneTypes.Assembly; BoundHedron: TYPE = SVModelTypes.BoundHedron; Camera: TYPE = SVModelTypes.Camera; Classification: TYPE = SVRayTypes.Classification; CoordSystem: TYPE = SVModelTypes.CoordSystem; LinearMesh: TYPE = SweepGeometry.LinearMesh; LightSourceList: TYPE = SVModelTypes.LightSourceList; MasterObject: TYPE = SVSceneTypes.MasterObject; PlanarSurface: TYPE = SVSceneTypes.PlanarSurface; PlanarSurfaceList: TYPE = SVSceneTypes.PlanarSurfaceList; Point2d: TYPE = SV2d.Point2d; Primitive: TYPE = SVRayTypes.Primitive; Ray: TYPE = SVRayTypes.Ray; RevoluteMesh: TYPE = SweepGeometry.RevoluteMesh; SphereRec: TYPE = REF SphereRecObj; SphereRecObj: TYPE = RECORD [ radius: REAL]; BlockRec: TYPE = REF BlockRecObj; BlockRecObj: TYPE = RECORD [ x, y, z: REAL]; CylinderRec: TYPE = REF CylinderRecObj; CylinderRecObj: TYPE = RECORD [ radius, height: REAL]; ConeRec: TYPE = REF ConeRecObj; ConeRecObj: TYPE = RECORD [ radius, height: REAL]; TorusRec: TYPE = REF TorusRecObj; TorusRecObj: TYPE = RECORD [ bigRadius: REAL, sectionRadius: REAL]; LonelyAssemblyHasSon: ERROR; -- returned from *PrimitiveFromAssembly if assembly is not a primitive assembly WrongTypeOfData: SIGNAL; -- signalled if the assembly given to *PrimitiveFromAssembly has an assembly.object which is not a MasterObject; TorusMakeMasterObject: PROC [name: Rope.ROPE, bigRadius: REAL, sectionRadius: REAL] RETURNS [mo: MasterObject]; LinSweepMakeMasterObject: PROC [name: Rope.ROPE, linMesh: LinearMesh] RETURNS [mo: MasterObject]; RevoSweepMakeMasterObject: PROC [name: Rope.ROPE, revMesh: RevoluteMesh] RETURNS [mo: MasterObject]; END. ˜File: BasicObject3d.mesa Last edited by Bier on July 29, 1984 4:55:35 pm PDT Copyright c 1984 by Xerox Corporation. All rights reserved. Contents: Defines a simple set of objects which can be display with ray casting, line drawing, or shaded planar-surface approximation BASIC SHAPES This module implements for each of the object classes: sphere, block, cone, cylinder, torus, linear sweep, and revolute sweep, all of the operations needed to implement that class. These operations include (but are not limited to): SphereMakeMasterObject: PROC [name: Rope.ROPE] RETURNS [mo: MasterObject]; SphereGetBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; SphereRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; SpherePreprocess: PROC [prim: Primitive, camera: Camera]; SphereLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; SphereDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; SphereCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; SphereCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; SphereGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; SphereDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; SphereDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; SphereFileout: PROC [f: IO.STREAM, mo: MasterObject]; SphereFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; BlockMakeMasterObject: PROC [name: Rope.ROPE] RETURNS [mo: MasterObject]; BlockGetBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; BlockRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; BlockPreprocess: PROC [prim: Primitive, camera: Camera]; BlockLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; BlockDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; BlockCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; BlockCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; BlockGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; BlockDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; BlockDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; BlockFileout: PROC [f: IO.STREAM, mo: MasterObject]; BlockFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; CylinderMakeMasterObject: PROC [name: Rope.ROPE] RETURNS [mo: MasterObject]; CylinderBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; CylinderRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; CylinderPreprocess: PROC [prim: Primitive, camera: Camera]; CylinderLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; CylinderDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; CylinderCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; CylinderCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; CylinderGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; CylinderDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; CylinderDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; CylinderFileout: PROC [f: IO.STREAM, mo: MasterObject]; CylinderFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; ConeMakeMasterObject: PROC [name: Rope.ROPE] RETURNS [mo: MasterObject]; ConeBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; ConeRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; ConePreprocess: PROC [prim: Primitive, camera: Camera]; ConeLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; ConeDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; ConeCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; ConeCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; ConeGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; ConeDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; ConeDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; ConeFileout: PROC [f: IO.STREAM, mo: MasterObject]; ConeFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; TorusBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; TorusRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; TorusPreprocess: PROC [prim: Primitive, camera: Camera]; TorusLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; TorusDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; TorusCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; TorusCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; TorusGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; TorusDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; TorusDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; TorusFileout: PROC [f: IO.STREAM, mo: MasterObject]; TorusFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; LinSweepBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; LinSweepRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; LinSweepPreprocess: PROC [prim: Primitive, camera: Camera]; LinSweepLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; LinSweepDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; LinSweepCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; LinSweepCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; LinSweepGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; LinSweepDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; LinSweepDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; LinSweepFileout: PROC [f: IO.STREAM, mo: MasterObject]; LinSweepFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; RevoSweepBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron]; RevoSweepRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification]; RevoSweepPreprocess: PROC [prim: Primitive, camera: Camera]; RevoSweepLineDraw: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; RevoSweepDrawNormals: PROC[dc: Graphics.Context, data: REF ANY, camera: Camera, localCS: CoordSystem]; RevoSweepCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT]; RevoSweepCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT]; RevoSweepGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList]; RevoSweepDrawSurf: PROC [dc: Graphics.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera]; RevoSweepDrawSubBoxes: PROC [dc: Graphics.Context, prim: Primitive, screenCS: CoordSystem]; RevoSweepFileout: PROC [f: IO.STREAM, mo: MasterObject]; RevoSweepFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject]; Κ ™– "cedar" style˜Iheadšœ™Iprocšœ3™3Jšœ Οmœ1™