File: SVHalfSpaces.mesa
Author: Eric Bier on May 31, 1984 3:11:36 pm PDT
Last edited by Bier: August 1, 1985 1:20:17 am PDT
Contents: Implementation of the half-space object class
DIRECTORY
Imager,
IO,
Rope,
SV2d,
SVModelTypes,
SVRayTypes,
SVSceneTypes;
SVHalfSpaces: DEFINITIONS =
BEGIN
BoundHedron: TYPE = SVModelTypes.BoundHedron;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
Classification: TYPE = SVRayTypes.Classification;
LightSourceList: TYPE = SVModelTypes.LightSourceList;
Point2d: TYPE = SV2d.Point2d;
Ray: TYPE = SVRayTypes.Ray;
PlanarSurface: TYPE = SVSceneTypes.PlanarSurface;
PlanarSurfaceList: TYPE = SVSceneTypes.PlanarSurfaceList;
Camera: TYPE = SVModelTypes.Camera;
MasterObject: TYPE = SVSceneTypes.MasterObject;
Primitive: TYPE = SVRayTypes.Primitive;
Assembly: TYPE = SVSceneTypes.Assembly;
BASIC SHAPES
HalfSpaceRec: TYPE = REF HalfSpaceRecObj;
HalfSpaceRecObj: TYPE = RECORD [
gridSide: REAL];
PlaneSurface: TYPE = REF PlaneSurfaceObj;
PlaneSurfaceObj: TYPE = RECORD [
];
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;
HalfSpaceMakeMasterObject: PROC [name: Rope.ROPE] RETURNS [mo: MasterObject];
HalfSpaceGetBoundHedron: PROC [mo: MasterObject] RETURNS [hedron: BoundHedron];
HalfSpaceRayCast: PROC [cameraPoint: Point2d, localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification];
HalfSpaceRayCastNoBBoxes: PROC [localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification];
HalfSpaceRayCastBoundingSpheres: PROC [localRay: Ray, masterObject: REF ANY, prim: Primitive] RETURNS [class: Classification];
HalfSpacePreprocess: PROC [prim: Primitive, camera: Camera];
HalfSpaceLineDraw: PROC[dc: Imager.Context, data: REF ANY, camera: Camera, localCS: CoordSystem];
HalfSpaceDrawNormals: PROC[dc: Imager.Context, data: REF ANY, camera: Camera, localCS: CoordSystem];
HalfSpaceCountSurf: PROC [masterObject: MasterObject] RETURNS [len: NAT];
HalfSpaceCountVert: PROC [masterObject: MasterObject] RETURNS [len: NAT];
HalfSpaceGetSurf: PROC [assembly: Assembly, camera: CoordSystem] RETURNS [psl: PlanarSurfaceList];
HalfSpaceDrawSurf: PROC [dc: Imager.Context, ps: PlanarSurface, lightSources: LightSourceList, camera: Camera];
HalfSpaceDrawSubBoxes: PROC [dc: Imager.Context, prim: Primitive, screenCS: CoordSystem];
HalfSpaceFileout: PROC [f: IO.STREAM, mo: MasterObject];
HalfSpaceFilein: PROC [f: IO.STREAM, name: Rope.ROPE] RETURNS [mo: MasterObject];
END.