DIRECTORY G3dBasic, G3dMatrix, G3dOctree, G3dShape, ImplicitDefs, Rope; ImplicitPoints: CEDAR DEFINITIONS ~ BEGIN PairSequence: TYPE ~ G3dBasic.PairSequence; Triple: TYPE ~ G3dBasic.Triple; TripleSequence: TYPE ~ G3dBasic.TripleSequence; Matrix: TYPE ~ G3dMatrix.Matrix; Viewport: TYPE ~ G3dMatrix.Viewport; Cross: TYPE ~ G3dOctree.Cross; CrossedEdge: TYPE ~ G3dOctree.CrossedEdge; CrossedEdges: TYPE ~ G3dOctree.CrossedEdges; CrossArray: TYPE ~ G3dOctree.CrossArray; Cube: TYPE ~ G3dOctree.Cube; CubeProc: TYPE ~ G3dOctree.CubeProc; Corner: TYPE ~ G3dOctree.Corner; Edge: TYPE ~ G3dOctree.Edge; TwoCorners: TYPE ~ G3dOctree.TwoCorners; VertexSequence: TYPE ~ G3dShape.VertexSequence; ColorProc: TYPE ~ ImplicitDefs.ColorProc; EdgeMode: TYPE ~ ImplicitDefs.EdgeMode; NormalProc: TYPE ~ ImplicitDefs.NormalProc; Surface: TYPE ~ ImplicitDefs.Surface; TextureProc: TYPE ~ ImplicitDefs.TextureProc; ValueProc: TYPE ~ ImplicitDefs.ValueProc; Vertex: TYPE ~ ImplicitDefs.Vertex; VertexOkProc: TYPE ~ ImplicitDefs.VertexOkProc; ROPE: TYPE ~ Rope.ROPE; NoCrossedEdge: ERROR; ValueNotSet: ERROR; IsOutOfRange: PROC [cube: Cube] RETURNS [BOOL]; IsCrossed: PROC [cube: Cube] RETURNS [BOOL]; CubeCrossedEdges: PROC [cube: Cube] RETURNS [CrossedEdges]; CrossedEdgeCorners: PROC [cube: Cube] RETURNS [TwoCorners]; CrossedPoint: PROC [ crossedEdge: CrossedEdge, valueProc: ValueProc, threshold: REAL ¬ 1.0, normalProc: NormalProc ¬ NIL, tolerance: REAL ¬ 0.0001, edgeMode: EdgeMode ¬ binarySectioning, clientData: REF ANY ¬ NIL] RETURNS [Cross]; CrossFromCrossedEdge: PROC [crossedEdge: CrossedEdge] RETURNS [cross: Cross]; VertexId: PROC [crossedEdge: CrossedEdge] RETURNS [INTEGER]; CheckAndGetCrossedEdges: PROC [ cube: Cube, valueProc: ValueProc, threshold: REAL ¬ 1.0, normalProc: NormalProc ¬ NIL, tolerance: REAL ¬ 0.0001, clientData: REF ANY ¬ NIL] RETURNS [CrossedEdges]; SetCornerValue: PROC [corner: Corner, value: REAL]; SetCornerValues: PROC [ cube: Cube, valueProc: ValueProc, threshold: REAL ¬ 1.0, clientData: REF ANY ¬ NIL]; SetKidValues: PROC [ parent: Cube, valueProc: ValueProc, threshold: REAL ¬ 1.0, clientData: REF ANY]; SetCrosses: PROC [ cube: Cube, crossedEdges: CrossedEdges, valueProc: ValueProc, threshold: REAL ¬ 1.0, normalProc: NormalProc ¬ NIL, tolerance: REAL ¬ 0.0001, edgeMode: EdgeMode ¬ binarySectioning, clientData: REF ANY ¬ NIL]; NextCWEdgeCrossed: PROC [edge: Edge, crossedEdges: CrossedEdges] RETURNS [Edge]; GetCrossArray: PROC [crossedEdges: CrossedEdges] RETURNS [CrossArray]; SetTerminalCubeValues: PROC [ root: Cube, valueProc: ValueProc, threshold: REAL ¬ 1.0, clientData: REF ANY ¬ NIL]; SetTerminalCubeCornerValuesAndCrossedPoints: PROC [ root: Cube, valueProc: ValueProc, threshold: REAL ¬ 1.0, normalProc: NormalProc ¬ NIL, cubeProc: CubeProc ¬ NIL, tolerance: REAL ¬ 0.0001, edgeMode: EdgeMode ¬ binarySectioning, clientData: REF ANY ¬ NIL] RETURNS [nImplicitEvaluations: INT]; NVerticesInRoot: PROC [root: Cube] RETURNS [INTEGER]; SetSurfaceVertices: PROC [ surface: Surface, root: Cube, valueProc: ValueProc, threshold: REAL ¬ 1.0, normalProc: NormalProc ¬ NIL, cubeProc: CubeProc ¬ NIL, vertexOkProc: VertexOkProc ¬ NIL, clientData: REF ANY ¬ NIL] RETURNS [message: ROPE]; AddSurfaceVertex: PUBLIC PROC [point, normal: Triple, surface: Surface] RETURNS [vertexId: INT]; SetVertexTextures: PROC [ surface: Surface, textureProc: TextureProc, cubeProc: CubeProc ¬ NIL, clientData: REF ANY ¬ NIL]; SetVertexColors: PROC [ surface: Surface, colorProc: ColorProc, cubeProc: CubeProc ¬ NIL, clientData: REF ANY ¬ NIL]; SetVertexScreenCoords: PROC [s: Surface, v: Matrix, vp: Viewport]; VertexScreenCoordsValid: PROC [surface: Surface] RETURNS [BOOL]; SetVertexScreenCoordsInvalid: PROC [surface: Surface]; SetVertexNormals: PROC [surface: Surface, cubeProc: CubeProc ¬ NIL]; GetPointNormal: PROC [ point: Triple, valueProc: ValueProc, value, delta: REAL, clientData: REF ANY ¬ NIL] RETURNS [Triple]; GetVertex: PROC [vertices: VertexSequence, nVertex: NAT] RETURNS [Vertex] ~ INLINE {RETURN[vertices[nVertex]]}; DecodePoints: PROC [surface: Surface, points: TripleSequence ¬ NIL] RETURNS [TripleSequence]; DecodeNormals: PROC [surface: Surface, normals: TripleSequence ¬ NIL] RETURNS [TripleSequence]; DecodeTextures: PROC [surface: Surface, textures: PairSequence ¬ NIL] RETURNS [PairSequence]; DecodeColors: PROC [surface: Surface, colors: TripleSequence ¬ NIL] RETURNS [TripleSequence]; END. ž ImplicitPoints.mesa Copyright Σ 1985, 1990 by Xerox Corporation. All rights reserved. Bloomenthal, February 26, 1993 2:49 pm PST CrossedEdge Procedures Return true if any of the cube corners are out of range. Return true if the surface crosses any of cube's edges. Can raise ValueNotSet. Return those edges crossed by the surface. Return the two corners of first encountered crossed edge; may raise ERROR NoCrossedEdge. Return location of edge-surface intersection; compute the location if unset. If normalProc is non-NIL, compute the normal if unset. tolerance controls the convergence along the cube edges. Return the cross for this crossedEdge; may rais ERROR NoCrossedEdge. Return the vertex id number for this crossedEdge; may raise ERROR NoCrossedEdge. Cube Procedures Insure all cube values set and surface crosses converged. Set the value field of corner and set valueSet to TRUE. corner.inside is TRUE iff value > 0. For terminal cubes, set value of any unset corners. Set the unset corner values of those corners of parent's kids that aren't shared with parent. For terminal cubes, set location of edge-surface intersections of any unset corners. tolerance controls the convergence along the cube edges. Return the next edge clockwise from edge that contains a surface crossedEdge. Return array of crosses. Root Procedures Set the value of any unset corner of cube. For terminal cubes, compute any unset surface-edge intersections. cubeProc is simply for reporting and/or client abort. tolerance controls the convergence along the cube edges. nImplicitEvaluations does not include the evaluations for convergence along an edge. Return the number of surface crossedEdges in the linear volume. Surface Procedures Set the vertex sequence field of surface. The vertex normals are set (whether or not normalProc is NIL). cubeProc is called for all terminal cubes intersecting the surface; if it returns FALSE, the vertex operation is aborted. Set any unset terminal cube corner values and compute any needed surface intersections. Set the vertex texture coordinates. Set the vertex colors. Transform vertices to screen space. Return true iff surface and surface.vertices # NIL and surface.pairsValid. Insure subsequent recalculation of vertex screen coordinates. Set the vertex normals using a polygon weighting method; this is inferior to computing the normal according to the surface gradient. Get the unitized normal at point; value is the non-thresholded value at point; delta is the sampling distance, recommended to be 0.01*cubeSize. Vertex Procedures Return vertex n from vertices. Return a sequence of three dimensional points representing the surface vertex locations. Return a sequence of three dimensional normals representing the surface vertex normals. Return a sequence of two dimensional textures representing the surface vertex textures. Return a sequence of three dimensional colors representing the surface vertex colors. ΚΑ•NewlineDelimiter ™™JšœB™BJ™*J˜JšΟk œ>˜GJ˜—JšΠblœœ ˜!J˜šœ˜J˜Jšœœ˜+Jšœœ˜!Jšœœ˜/Jšœœ˜"Jšœ œ˜&Jšœœ˜!Jšœ œ˜+Jšœœ˜,Jšœ œ˜)Jšœœ˜Jšœ œ˜%Jšœœ˜"Jšœœ˜Jšœ œ˜)Jšœœ˜/Jšœ œ˜*Jšœ œ˜(Jšœ œ˜,Jšœ œ˜'Jšœ œ˜.Jšœ œ˜*Jšœœ˜%Jšœœ˜/Jšœœœ˜J˜Jšœœ˜—headšΟl™šœ œ˜J˜—šΟn œœœœ˜/J™8J™—š  œœœœ˜,J™OJ˜—š œœœ˜;J™*J™—š œœœ˜;JšœDΟsœ™XJ™—š  œœ˜J˜J˜Jšœ œ˜Jšœœ˜Jšœ œ ˜J˜&Jšœ œœœ˜Jšœ ˜J™LJšœ‘œ™6J™8J™—š œœœ˜MJšœ0‘œ™DJ™—š œœœœ˜™CJšœ‘œ"™5—Jšœ£T™WJ™—šΠbnœ œ*˜GJšœ œ˜J˜—š œœ˜J˜J˜Jšœœ˜Jšœ œœœ˜J™#J™—š œœ˜J˜J˜Jšœœ˜Jšœ œœœ˜J™J™—š œœ'˜BJš£#™#J™—š œœœœ˜@Jšœ/‘œ™JJ™—š œœ˜6J™=J™—š œœ)œ˜DJ™8J™KJ™—š œœ˜J˜J˜Jšœœ˜Jšœ œœœ˜Jšœ ˜Jšœ/’œ™NJ™@——šŸ™š  œœ%œœ ˜IJ™Jšœœœ˜%J˜—š  œœ-œ˜CJšœ˜J™XJ™—š  œœ.œ˜EJšœ˜J™WJ™—š œœ-œ˜EJšœ˜J™WJ™—š  œœ-œ˜CJšœ˜J™U——J˜šœ˜Jš˜——…—‚$α