File: DisplayListToTree.mesa
Created July 17, 1984 10:26:46 am PDT
Last edited by Eric Bier on August 5, 1984 12:40:29 pm PDT
DIRECTORY
IO,
SVModelTypes,
SVRayTypes,
SVSceneTypes;
DisplayListToTree: CEDAR DEFINITIONS =
BEGIN
Assembly: TYPE = SVSceneTypes.Assembly;
Camera: TYPE = SVModelTypes.Camera;
CoordSysList: TYPE = SVModelTypes.CoordSysList;
CSGTree: TYPE = SVRayTypes.CSGTree;
Primitive: TYPE = SVRayTypes.Primitive;
Scene: TYPE = SVSceneTypes.Scene;
AssemblyToTree:
PROC [assembly: Assembly, scene: Scene, camera: Camera]
RETURNS [tree: CSGTree];
Computes bounding spheres and bounding boxes as needed. Opens AIS files for use with texture mapping.
PrimitiveFromAssembly: PROC [assem: Assembly, inverted: BOOL] RETURNS [prim: Primitive];
PrimitiveAssemblyWithoutMO: ERROR;
CoordSysListFromScene:
PROC [scene: Scene]
RETURNS [csl: CoordSysList];
Returns a list of all of the assembly coordinate systems (not including the scalars-only shape coordinate systems). The list is in breadth-first order.
ListTree:
PROC [outHandle:
IO.
STREAM, tree: CSGTree];
Prints a representation of the entire CSGTree onto the given stream.
CommonAncestor:
PROC [red: Assembly, blue: Assembly, root: Assembly]
RETURNS [gramps: Assembly];
red and blue must both be in the same tree. gramps will be the deepest node which contains both red and blue.
IsSuccessorOf:
PROC [testChild: Assembly, testAncestor: Assembly]
RETURNS [
BOOL];
Returns TRUE if testChild is in the tree rooted at testAncestor, FALSE otherwise.
AncestorAtLevel:
PROC [child: Assembly, root: Assembly, level:
NAT]
RETURNS [gramps: Assembly];
Returns the ancestor of child which is level levels below root. If level is 0, should return root. If level = 1, an immediate child of root and so on.
END.