DIRECTORY G3dBasic, G3dOctree, G3dShape, G3dSpline, Imager, Real, Rope, ViewerClasses; ImplicitDefs: CEDAR DEFINITIONS ~ BEGIN Octree: TYPE ~ G3dOctree.Octree; Cube: TYPE ~ G3dOctree.Cube; Corner: TYPE ~ G3dOctree.Corner; CrossSequence: TYPE ~ G3dOctree.CrossSequence; NatSequence: TYPE ~ G3dBasic.NatSequence; NatSequenceRep: TYPE ~ G3dBasic.NatSequenceRep; Pair: TYPE ~ G3dBasic.Pair; Triple: TYPE ~ G3dBasic.Triple; TripleSequence: TYPE ~ G3dBasic.TripleSequence; TripleSequenceRep: TYPE ~ G3dBasic.TripleSequenceRep; ScreenSequence: TYPE ~ G3dShape.ScreenSequence; Validity: TYPE ~ G3dShape.Validity; SplineSequence: TYPE ~ G3dSpline.SplineSequence; ROPE: TYPE ~ Rope.ROPE; Context: TYPE ~ Imager.Context; Viewer: TYPE ~ ViewerClasses.Viewer; Use: TYPE ~ {unknown, animateClient, animateSurface}; EdgeMode: TYPE ~ { regulaFalsi, -- methods of converging binarySectioning -- along a segment }; DistanceMode: TYPE ~ { inverse, -- value a inverse dist. to p inverseSqrd, -- a inverse distance-squared wtInverse, -- value a inverse weighted d wtInverseSqrd -- a inverse weighted d2 }; ConnectProc: TYPE ~ PROC [p0, p1: Triple]; ValueProc: TYPE ~ PROC [ point: Triple, clientData: REF ANY ¬ NIL, corner: Corner ¬ NIL] RETURNS [value: REAL ¬ 0.0]; StartProc: TYPE ~ PROC [ clientData: REF ANY ¬ NIL, use: Use ¬ unknown, frame, nFrames: NAT ¬ 0] RETURNS [point: Triple]; CubeOkProc: TYPE ~ PROC [cube: Cube, clientData: REF ANY ¬ NIL] RETURNS [ok: BOOL]; VertexOkProc: TYPE ~ PROC [point: Triple, clientData: REF ANY ¬ NIL] RETURNS [ok: BOOL]; PolygonOkProc: TYPE ~ PROC [points: TripleSequence, clientData: REF ANY ¬ NIL] RETURNS [ok: BOOL]; NormalProc: TYPE ~ PROC [ point: Triple, value: REAL ¬ 0.0, clientData: REF ANY ¬ NIL] RETURNS [normal: Triple ¬ [0.0, 0.0, 0.0]]; ColorProc: TYPE ~ PROC [vertex: Vertex, clientData: REF ANY ¬ NIL] RETURNS [color: Triple ¬ [1.0, 1.0, 1.0]]; TextureProc: TYPE ~ PROC [vertex: Vertex, clientData: REF ANY ¬ NIL] RETURNS [texture: Pair ¬ [0.0, 0.0]]; StatusProc: TYPE ~ PROC [ref: REF ¬ NIL] RETURNS [atom: ATOM ¬ $Continue]; SurfaceProc: TYPE ~ PROC [cube: Cube] RETURNS [intersects: BOOL]; DocProc: TYPE ~ PROC [clientData: REF ANY] RETURNS [doc: ROPE]; DiagramProc: TYPE ~ PROC [ context: Context, point: Triple, clientData: REF ANY ¬ NIL, whatChanged: REF ANY ¬ NIL, viewer: Viewer ¬ NIL]; Vertex: TYPE ~ G3dShape.Vertex; VertexSequence: TYPE ~ G3dShape.VertexSequence; VertexSequenceRep: TYPE ~ G3dShape.VertexSequenceRep; Surface: TYPE ~ REF SurfaceRep; SurfaceRep: TYPE ~ RECORD [ octree: Octree ¬ NIL, -- the octree vertices: VertexSequence ¬ NIL, -- sequence of surface vertices vertexValidities: ARRAY Validity OF BOOL ¬ ALL[FALSE], screens: ScreenSequence ¬ NIL, -- screen locations of vertices nPolygons: CARDINAL ¬ 0, -- number of polygons polygons: LIST OF NatSequence ¬ NIL, -- run-encoded vertex indices faceNormals: TripleSequence ¬ NIL, -- normal per polygon faceCenters: TripleSequence ¬ NIL, -- center per polygon curves: SplineSequence ¬ NIL, -- curves connecting vertices curvesValid: BOOL ¬ FALSE, -- true if curves updated clientData: REF ANY ¬ NIL -- client data ]; MacroPolygons: TYPE ~ RECORD [ nPolygons: {none, one, many}, polygon: CrossSequence ]; Target: TYPE ~ RECORD [ point: Triple ¬ origin, value: REAL ¬ 0.0, nTries: NAT ¬ 0 ]; Sample: TYPE ~ RECORD [ value: REAL ¬ 0.0, -- value of point sampled in space near: Triple ¬ origin, -- nearest point vector: Triple ¬ origin, -- from query point to nearest point proximity: REAL ¬ huge, -- client evaluated (~ ABS[value-threshold]) normalized: BOOL ¬ FALSE, -- iff vector normalized radius: REAL ¬ 0.0, -- radius of tube at nearest point ratio: REAL ¬ 0.0, -- (distance-radius)/radius squareDistance: REAL ¬ 0.0, -- distance-squared to nearest point distance: REAL ¬ 0.0, -- distance to nearest point distanceSet: BOOL ¬ FALSE, -- iff distance field is correct refAny: REF ANY ¬ NIL -- probably pointer to nearest surface ]; origin: Triple ~ G3dBasic.origin; huge: REAL ~ Real.LargestNumber; maxNTriples: CARDINAL ~ (LAST[CARDINAL]-4-SIZE[TripleSequenceRep[0]])/SIZE[Triple]; maxNNats: CARDINAL ~ (LAST[CARDINAL]-4-SIZE[NatSequenceRep[0]])/SIZE[NAT]; maxNVertices: CARDINAL ~ (LAST[CARDINAL]-4-SIZE[VertexSequenceRep[0]])/SIZE[Vertex]; END. F ImplicitDefs.mesa Copyright Σ 1985, 1990 by Xerox Corporation. All rights reserved. Bloomenthal, September 15, 1992 6:15 pm PDT Notes Triangles should be defined clockwise when viewed from the outside. Imported Types Modes Proc Definitions Return the value at point (> 0 inside, < 0 outside surface). corner is available for setting .nearest or .outOfRange. corner.outOfRange ¬ TRUE if point out of function range. Return a start point for implicit tracking. frame and nFrames meaningful if use is an animation. Return FALSE to eliminate cube from the octree. Return FALSE to eliminate point (and any polygons containing it) from the surface. Return FALSE to eliminate polygon from the surface. Return the surface normal at point, presumably unitized. Return the color at vertex. Return the u, v texture coordinates at vertex. Called when making the surface or the octree. ref is usually one of: $MakeOctree, $AdaptOctree, $SetCorners, $MakeVertices $MakePolygons, $MakeNormals, $MakeTextures, $Done, ROPE, or Cube. atom = $Abort or $RejectCube is generally recognized. True iff surface intersects the cube. Get client documentation when, for example, writing to a file. Diagram an implicit function relative to given point in space. The Surface Format for surface.polygons: This is a list of nat sequences, thus allowing a practically unlimited number of polygons. Each list is encoded: the first number is the number of vertices for the first polygon; the indices to these vertices appear next on the list, followed again by a number indicating the number of vertices of the next polygon, and so on. Implicit Tracking Implicit Evaluation Constants ΚR•NewlineDelimiter ™™JšœB™BJ™+J˜JšΟk œM˜VJ˜—JšΠbl œœ˜'IheadšΟl™Iindent™CšŸ™Jšœ œ˜$Jšœ œ˜!Jšœ œ˜$Jšœœ˜0Jšœœ˜,Jšœœ˜1Jšœ œ˜ Jšœ œ˜$Jšœœ˜1Jšœœ˜6Jšœœ˜1Jšœ œ˜'Jšœœ˜2Jšœ œœ˜Jšœ œ˜#Jšœ œ˜(—šŸ™šœ œ,˜:J˜—šœ œ˜JšœΟc˜2Jšœ ˜.J˜J˜—šœ œ˜Jšœ  Ρcgl ˜4Jšœ ‘ ˜7Jšœ  ‘ ˜5Jšœ ‘ Πcu˜2J˜——šŸ™šΟb œœœ˜,J™—š£ œœœ˜J˜Jšœœœœ˜#Jšœœ˜Jšœœ˜%J™EJšœA™AJšœΟsœ ™AJ™—š£ œœœ˜Jšœœœœ˜#J˜Jšœœ˜!Jšœ œ˜!J™4J™=J™—š £ œœœœœœ˜AJšœ œœ˜JšœΠksœ#™8J™—š £ œœœœœœ˜FJšœ œœ˜Jšœ₯œ%™:J™)J™—š £ œœœ&œœœ˜OJšœ œœ˜Jšœ€œ'™J™;Jšœ €œ ™J™=—J™—š £ œœœœœ˜CJ™.J™—š£œœœœœœœ˜CJ™GJ™—š£ œœœ˜J˜J˜Jšœ  œœœ˜Jšœ œœœ˜Jšœœ˜J™G——šŸ ™ Jšœ œ˜#Jšœœ˜1šœœ˜6J˜—™J™ZJ™WJ™QJ™AJ™—Jšœ œœ ˜#šœœœ˜Jšœœ  ˜-Jšœ!œ ˜GJš œœ œœœœ˜:Jšœ œ ˜FJšœœ  ˜7Jšœœœœ ˜HJšœ#œ ˜?Jšœ#œ ˜?Jšœœ ˜CJšœœœ ˜=Jšœœœœ ˜2J˜J˜—šœœœ˜ J˜"Jšœ œ ˜J˜——šŸ™šœ œœ˜J˜Jšœœ˜Jšœ œ˜J˜——šŸ™šœ œœ˜Jšœœ  (˜CJšœ ˜.Jšœ $˜CJšœœ  Πcs ˜IJšœœœ ˜7Jšœœ  "˜=Jšœœ  ˜6Jšœœ  $˜EJšœœ  ˜9Jšœœœ  ˜@Jšœœœœ &˜BJ˜——šŸ ™ J˜%šœ œ˜%J˜—Jšœœœ₯œ€œœ€₯€œ˜VJšœ  œœ₯œ€œœ€₯œ₯œ˜MJš œ₯€₯€₯€₯€₯€ ˜V—J˜Jšœ˜J˜—…—φ!Ž