File: SVMasterObject.mesa
Last edited by Bier on July 8, 1987 5:21:18 pm PDT
Copyright © 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
DIRECTORY
Imager, IO, SVObjectCast, Rope, SV2d, SV3d, SVBasicTypes, SVModelTypes, SVSceneTypes, SweepGeometry;
SVMasterObject: CEDAR DEFINITIONS =
BEGIN
Slice: TYPE = SVSceneTypes.Slice;
BoundHedron: TYPE = SVBasicTypes.BoundHedron;
Camera: TYPE = SVModelTypes.Camera;
Classification: TYPE = SVSceneTypes.Classification;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
LinearMesh: TYPE = SweepGeometry.LinearMesh;
LightSourceList: TYPE = SVModelTypes.LightSourceList;
MasterObject: TYPE = SVSceneTypes.MasterObject;
MasterObjectClass: TYPE = SVSceneTypes.MasterObjectClass;
MasterObjectList: TYPE = SVSceneTypes.MasterObjectList;
Path: TYPE = SV2d.Path;
Point2d: TYPE = SV2d.Point2d;
Point3d: TYPE = SV3d.Point3d;
Primitive: TYPE = SVSceneTypes.Primitive;
Ray: TYPE = SVSceneTypes.Ray;
RevoluteMesh: TYPE = SweepGeometry.RevoluteMesh;
Fundamentals
GetHedronProc: TYPE = SVSceneTypes.GetHedronProc;
Drawing
LineDrawProc: TYPE = SVSceneTypes.LineDrawProc;
NormalsDrawProc: TYPE = SVSceneTypes.NormalsDrawProc;
PreprocessProc: TYPE = SVSceneTypes.PreprocessProc;
RayCastProc: TYPE = SVSceneTypes.RayCastProc;
RayCastNoBBoxesProc: TYPE = SVSceneTypes.RayCastNoBBoxesProc;
RayCastBoundingSpheresProc: TYPE = SVSceneTypes.RayCastBoundingSpheresProc;
DrawPlanarSurfaceProc: TYPE = SVSceneTypes.DrawPlanarSurfaceProc;
DrawSubBoxesProc: TYPE = SVSceneTypes.DrawSubBoxesProc;
DrawSubSpheresProc: TYPE = SVSceneTypes.DrawSubSpheresProc;
DrawSelectionFeedbackProc: TYPE = SVSceneTypes.DrawSelectionFeedbackProc;
DrawAttractorFeedbackProc: TYPE = SVSceneTypes.DrawAttractorFeedbackProc;
Textual Description
DescribeProc: TYPE = SVSceneTypes.DescribeProc;
DescribeHitProc: TYPE = SVSceneTypes.DescribeHitProc;
FileinProc: TYPE = SVSceneTypes.FileinProc;
FileoutProc: TYPE = SVSceneTypes.FileoutProc;
FileoutPolyProc: TYPE = SVSceneTypes.FileoutPolyProc;
Parts
CountSurfProc: TYPE = SVSceneTypes.CountSurfProc;
GetSurfProc: TYPE = SVSceneTypes.GetSurfProc;
EmptyPartsProc: TYPE = SVSceneTypes.EmptyPartsProc;
NewPartsProc: TYPE = SVSceneTypes.NewPartsProc;
UnionPartsProc: TYPE = SVSceneTypes.UnionPartsProc;
DifferencePartsProc: TYPE = SVSceneTypes.DifferencePartsProc;
MovingPartsProc: TYPE = SVSceneTypes.MovingPartsProc;
AugmentPartsProc: TYPE = SVSceneTypes.AugmentPartsProc;
Part Generators
PointsInDescriptorProc: TYPE = SVSceneTypes.PointsInDescriptorProc;
NextPointProc: TYPE = SVSceneTypes.NextPointProc;
PointPairsInDescriptorProc: TYPE = SVSceneTypes.PointPairsInDescriptorProc;
NextPointPairProc: TYPE = SVSceneTypes.NextPointPairProc;
Hit Testing
ClosestPointToPointProc: TYPE = SVSceneTypes.ClosestPointToPointProc;
ClosestPointToLineProc: TYPE = SVSceneTypes.ClosestPointToLineProc;
ClosestSegmentToLineProc: TYPE = SVSceneTypes.ClosestSegmentToLineProc;
Miscellaneous
UpdateProc: TYPE = SVSceneTypes.UpdateProc;
PlanarSurface: TYPE = SVSceneTypes.PlanarSurface;
PlanarSurfaceList: TYPE = SVSceneTypes.PlanarSurfaceList;
BASIC SHAPES
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;
BoxMakeMasterObject: PROC [name: Rope.ROPE, w, h: REAL] RETURNS [mo: MasterObject];
BlockHitData: TYPE = REF BlockHitDataObj;
BlockHitDataObj: TYPE = RECORD [
corner: [-1..7] ← -1,
center: [-1..5] ← -1,
centroid: [-1..0] ← -1,
edge: [-1..11] ← -1,
face: [-1..5] ← -1,
still: BOOLTRUE,
hitPoint: Point3d ← [0,0,0]
];
BlockMakeMasterObject: PROC [name: Rope.ROPE, loX, loY, loZ: REAL ← -1.0, hiX, hiY, hiZ: REAL ← 1.0] RETURNS [mo: 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, path: Path, long: NAT] RETURNS [mo: MasterObject];
Set Up the System
RegisterMasterObjectClass: PROC [moClass: MasterObjectClass];
RegisterMasterObject: PROC [mo: MasterObject];
GetMasterObjectList: PROC [] RETURNS [moList: MasterObjectList];
FindClassFromName: PROC [name: Rope.ROPE] RETURNS [moClass: MasterObjectClass, success: BOOL];
Adds a MasterObject to a global list at load time. It is later added to the default scene at viewer startup (CreateScene) time.
Null Bodies In SVMasterObjectImplB.
Fundamentals
NoOpGetHedron: GetHedronProc;
Drawing
NoOpLineDraw: LineDrawProc;
NoOpNormalsDraw: NormalsDrawProc;
NoOpPreprocess: PreprocessProc;
NoOpRayCast: RayCastProc;
NoOpRayCastNoBBoxes: RayCastNoBBoxesProc;
NoOpRayCastBoundingSpheres: RayCastBoundingSpheresProc;
NoOpDrawPlanarSurface: DrawPlanarSurfaceProc;
NoOpDrawSubBoxes: DrawSubBoxesProc;
NoOpDrawSubSpheres: DrawSubSpheresProc;
NoOpDrawSelectionFeedback: DrawSelectionFeedbackProc;
NoOpDrawAttractorFeedback: DrawAttractorFeedbackProc;
Textual Description
NoOpDescribe: DescribeProc;
NoOpDescribeHit: DescribeHitProc;
NoOpFilein: FileinProc;
NoOpFileout: FileoutProc;
NoOpFileoutPoly: FileoutPolyProc;
Parts
NoOpCountPlanarSurfaces: CountSurfProc;
NoOpGetPlanarSurfaces: GetSurfProc;
NoOpEmptyParts: EmptyPartsProc;
NoOpNewParts: NewPartsProc;
NoOpUnionParts: UnionPartsProc;
NoOpDifferenceParts: DifferencePartsProc;
NoOpMovingParts: MovingPartsProc;
NoOpAugmentParts: AugmentPartsProc;
Part Generators
NoOpPointsInDescriptor: PointsInDescriptorProc;
NoOpNextPoint: NextPointProc;
NoOpPointPairsInDescriptor: PointPairsInDescriptorProc;
NoOpNextPointPair: NextPointPairProc;
Hit Testing
NoOpClosestPointToPoint: ClosestPointToPointProc;
NoOpClosestPointToLine: ClosestPointToLineProc;
NoOpClosestSegmentToLine: ClosestSegmentToLineProc;
Miscellaneous
NoOpUpdate: UpdateProc;
END.