File: SVMasterObject.mesa
Last edited by Bier on September 1, 1987 6:52:17 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, SVSweepGeometry;
SVMasterObject: CEDAR DEFINITIONS =
BEGIN
Artwork: TYPE = SVModelTypes.Artwork;
BoundHedron: TYPE = SVBasicTypes.BoundHedron;
Camera: TYPE = SVModelTypes.Camera;
Classification: TYPE = SVSceneTypes.Classification;
CoordSystem: TYPE = SVModelTypes.CoordSystem;
LinearMesh: TYPE = SVSweepGeometry.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 = SVSweepGeometry.RevoluteMesh;
Slice: TYPE = SVSceneTypes.Slice;
SliceParts: TYPE = SVSceneTypes.SliceParts;
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;
IsEmptyPartsProc: TYPE = SVSceneTypes.IsEmptyPartsProc;
IsCompletePartsProc: TYPE = SVSceneTypes.IsCompletePartsProc;
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;
Style
SetStrokeColorProc: TYPE = SVSceneTypes.SetStrokeColorProc;
GetStrokeColorProc: TYPE = SVSceneTypes.GetStrokeColorProc;
SetFillColorProc: TYPE = SVSceneTypes.SetFillColorProc;
GetFillColorProc: TYPE = SVSceneTypes.GetFillColorProc;
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];
Surface: TYPE = REF ANY;
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];
MakeBlockSlice: PROC [name: Rope.ROPE, loX, loY, loZ: REAL ← -1.0, hiX, hiY, hiZ: REAL ← 1.0, corner: [0..7]] RETURNS [sliceParts: SliceParts, mo: MasterObject];
BlockGetFillArtwork: PROC [surf: Surface, mo: MasterObject] RETURNS [artwork: Artwork];
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;
NoOpIsEmptyParts: IsEmptyPartsProc;
NoOpIsCompleteParts: IsCompletePartsProc;
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;
Style
NoOpSetStrokeColor: SetStrokeColorProc;
NoOpGetStrokeColor: GetStrokeColorProc;
NoOpSetFillColor: SetFillColorProc;
NoOpGetFillColor: GetFillColorProc;
END.