choice:
INT ¬ Controls.PopUpRequest[["Octree Options"],
LIST[
--1--
IF t.octreeType = track
THEN ["converge", "Now Tracking"] ELSE ["track", "Now Converging"],
--2-- ["set distance mode", "Choose a distance mode (default is inverseSquared)"],
--3-- ["set measure mode", "Choose a measure mode (default is segment)"],
--4-- ["set edge mode", "Choose a edge convergence mode (default is binarySectioning)"],
--5-- V["tolerance", "Distance measurement error tolerance", t.tolerance],
--6-- V["threshold", "Set threshold (contour level) of surface", t.threshold],
--7-- V["spread", "Set radius of influence", t.spread],
--8-- V["post adapt limit", "Set max post octree adaptive subdiv", t.adaptAfterMax],
--9-- V["track adapt limit", "Set max adaptive tracking subdiv", t.adaptDuringMax],
--10-- V["adapt flatness", "Set polygon flatness criterion", t.flatness],
--11-- V["octree tolerance", "Set octree convergence tolerance", t.octreeTolerance],
--12-- V["min recusion", "Set min recursion depth of converging octree", t.recurseMin],
--13-- V["max recursion", "Set max recursion depth of converging octree", t.recurseMax],
--14-- V["tracking size", "Cube size for tracking surface", t.trackSize],
--15-- V["converging size", "Root cube size for converging octree", t.rootSize],
--16-- IF t.triangulate THEN ["polygons", "Now triangles"] ELSE ["triangles", "Now polygons"],
--17-- ["MAKE AND POLYGONIZE OCTREE", "Make and polygonize an octree"],
--18-- ["MAKE OCTREE ONLY", "Make an octree"],
--19-- ["POLYGONIZE OCTREE", "Polygonize the existing octree"],
--20-- Controls.RopeRequest["SaveShape", "Automatically save shape file", t.saveShape],
--21-- Controls.RopeRequest["SaveIP", "Automatically save Interpress file", t.saveIP],
--22-- Controls.RopeRequest["Shape name", "Base animated files", t.animateShapeName],
--23-- ["OUTPUT OCTREE", "Output the octree"],
--24-- ["READ OCTREE", "Read an octree from an octree file"],
--25--
IF t.animationUse = client
THEN ["Animate surface", "now client"] ELSE ["Animate client", "now surface"],
--26-- Controls.BoolRequest[t.record, "Record"]]];
SELECT choice
FROM
1 => t.octreeType ¬ IF t.octreeType = track THEN converge ELSE track;
2 => SetDistanceMode[t];
3 => SetMeasureMode[t];
4 => SetEdgeMode[t];
5 => t.tolerance ¬ GetReal[t, "Sampling Tolerance", t.tolerance];
6 => t.threshold ¬ GetReal[t, "Threshold", t.threshold];
7 => t.spread ¬ GetReal[t, "Spread", t.spread];
8 => t.adaptAfterMax ¬ GetNat[t, "AfterAdaptLimit", t.adaptAfterMax];
9 => t.adaptDuringMax ¬ GetNat[t, "DuringAdaptLimit", t.adaptDuringMax];
10 => t.flatness ¬ GetReal[t, "Flatness", t.flatness];
11 => t.octreeTolerance ¬ GetReal[t, "Octree Tolerance", t.octreeTolerance];
12 => t.recurseMin ¬ GetNat[t, "RecurseMin", t.recurseMin];
13 => t.recurseMax ¬ GetNat[t, "RecurseMax", t.recurseMax];
14 => t.trackSize ¬ GetReal[t, "TrackSize", t.trackSize];
15 => t.rootSize ¬ GetReal[t, "ConvergeSize", t.rootSize];
16 => t.triangulate ¬ NOT t.triangulate;
17 => MakeAll[t];
18 => MakeOctree[t];
19 => MakePolygons[t];
20 => t.saveShape ¬ Controls.TypescriptReadFileName[t.tool3d.typescript];
21 => t.saveIP ¬ Controls.TypescriptReadFileName[t.tool3d.typescript];
22 => t.animateShapeName ¬ Controls.TypescriptReadFileName[t.tool3d.typescript];
23 =>
IF t.octree =
NIL
THEN Controls.TypescriptWrite[t.tool3d.typescript, "No octree to write.\n"]
ELSE G3dOctree.WriteCubesToFile[
Controls.TypescriptReadFileName[t.tool3d.typescript], t.octree.root, MiscInfo[t]];
24 => {
IF t.octree = NIL THEN t.octree ¬ NEW[G3dOctree.OctreeRep];
t.octree.root ¬
G3dOctree.ReadCubesFromFile[Controls.TypescriptReadFileName[t.tool3d.typescript]];
IF t.octree.root #
NIL
THEN {
G3dOctree.SetOctreeFields[t.octree];
IF t.surface = NIL THEN t.surface ¬ NEW[ImplicitDefs.SurfaceRep];
t.surface.octree ¬ t.octree;
Repaint[t];
};
};
25 => t.animationUse ¬ IF t.animationUse = client THEN surface ELSE client;
26 => t.record ¬ NOT t.record;
ENDCASE;