File: SVHalfSpaces.mesa
Author: Eric Bier on May 31, 1984 3:11:36 pm PDT
Last edited by Bier: May 5, 1987 11:51:47 pm PDT
Contents: Implementation of the half-space object class
DIRECTORY
Imager, IO, Rope, SV2d, SVBasicTypes, SVModelTypes, SVRayTypes, SVSceneTypes;
SVHalfSpaces: CEDAR DEFINITIONS =
BEGIN
BoundHedron: TYPE = SVBasicTypes.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;
Slice: TYPE = SVSceneTypes.Slice;
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[slice: Slice, dc: Imager.Context, camera: Camera];
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 [slice: Slice, 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, version: REAL] RETURNS [mo: MasterObject];
END.