<<>> <> <> <> <> DIRECTORY G3dBasic, G3dQuaternion, G3dScene, G3dShape, G3dSweep, G3dRender, Random, Rope; G3dBuild: CEDAR DEFINITIONS ~ BEGIN <> AxisAngle: TYPE ~ G3dQuaternion.AxisAngle; BlendType: TYPE ~ G3dSweep.BlendType; Context3d: TYPE ~ G3dRender.Context3d; ParseState: TYPE ~ G3dScene.ParseState; RandomStream: TYPE ~ Random.RandomStream; ROPE: TYPE ~ Rope.ROPE; SceneProc: TYPE ~ G3dScene.SceneProc; Shape: TYPE ~ G3dShape.Shape; Triple: TYPE ~ G3dBasic.Triple; TripleSequence: TYPE ~ G3dBasic.TripleSequence; <> SweepPaths: TYPE ~ REF SweepPathsRep; SweepPathsRep: TYPE ~ RECORD [ shapeFile: ROPE ¬ NIL, shapeBlend: BlendType ¬ smooth, scaleFile: ROPE ¬ NIL, scaleBlend: BlendType ¬ smooth, rotateFile: ROPE ¬ NIL, rotateBlend: BlendType ¬ smooth, translateFile: ROPE ¬ NIL, translateBlend: BlendType ¬ smooth, pathFile: ROPE ¬ NIL, pathBlend: BlendType ¬ smooth ]; Field: TYPE ~ REF FieldRep; FieldRep: TYPE ~ RECORD [ <> on: BOOL ¬ FALSE, center: Triple ¬ [0.0, 0.0, 0.0], amplitude: REAL ¬ 1.0, radius: REAL ¬ 1.0, power: REAL ¬ 1.0, offset: REAL ¬ 0.0 ]; State: TYPE ~ REF StateRep; StateRep: TYPE ~ RECORD [ field: Field ¬ NIL, sweepPaths: SweepPaths ¬ NIL, randomStream: RandomStream ]; <> pi: REAL = 3.141593; piOver2: REAL = 1.570796; piTimes2: REAL = 6.283186; degToRad: REAL = 1.745329e-2; radToDeg: REAL = 57.29577; <> <> GetBuildState: PUBLIC PROC [ps: ParseState] RETURNS [State]; <> <> TranslateShapeAlongZ : PUBLIC PROC [ shape: Shape, distance: REAL ¬ 1.0, anchor: BOOL ¬ FALSE ] RETURNS [Shape]; <> <<>> TranslateShape: PUBLIC PROC [ shape: Shape, lo, hi: Triple, anchor: BOOL ¬ FALSE ] RETURNS [Shape]; <> <<>> RevolveShape: PUBLIC PROC [ shape: Shape, steps: INT ¬ 10, loAngle: REAL ¬ 0.0, -- angle extreme in degrees hiAngle: REAL ¬ 360.0, -- angle extreme in degrees axis: Triple ¬ [0.0, 0.0, 1.0], anchor: BOOL ¬ FALSE, objClosed: BOOL ¬ FALSE ] RETURNS [Shape]; <> <> MakeSphere: PUBLIC SceneProc; MakeCylinder: PUBLIC SceneProc; MakeCone: PUBLIC SceneProc; MakeTorus: PUBLIC SceneProc; MakeNGon: PUBLIC SceneProc; MakeAnnulus: PUBLIC SceneProc; <> ShapeFromTripleSequence: PUBLIC PROC [ts: TripleSequence] RETURNS [Shape]; <> ShapeFromTripleList: PUBLIC PROC [tl: LIST OF Triple] RETURNS [Shape]; <> ResampleTriples: PUBLIC PROC [ts: TripleSequence, steps: INT, close: BOOL, curved: BOOL ¬ TRUE] RETURNS [TripleSequence]; <> <> LoadShape: PUBLIC PROC [ps: ParseState, state: State, shape: Shape]; <> UpdateShape: PUBLIC PROC [ps: ParseState, state: State, shape: Shape]; <> AutoName: PUBLIC PROC [context3d: Context3d, type: ROPE] RETURNS [ROPE]; <> AutoUTexture: PUBLIC PROC [shape: Shape]; <> <> ClearSweepPaths: PUBLIC SceneProc; ChangeSweepPaths: PUBLIC SceneProc; MakeSweep: PUBLIC SceneProc; <> <> PolyStellate: PUBLIC SceneProc; PolyFrame: PUBLIC SceneProc; PolyDilate: PUBLIC SceneProc; PolyRotate: PUBLIC SceneProc; PolyExplodeP: PUBLIC SceneProc; PolyInscribe: PUBLIC SceneProc; PolyCorners: PUBLIC SceneProc; PolyCutCorners: PUBLIC SceneProc; PolySplotch: PUBLIC SceneProc; PolyFan: PUBLIC SceneProc; PolyStar: PUBLIC SceneProc; <> <> StellateShape: PUBLIC PROC [shape: Shape, factor: REAL ¬ 1.0, bases: BOOL ¬ TRUE]; FrameShape: PUBLIC PROC [shape: Shape, factor: REAL ¬ 1.0]; DilateShape: PUBLIC PROC [shape: Shape, factor: REAL ¬ 1.0]; RotateShape: PUBLIC PROC [shape: Shape, theta: REAL ¬ piOver2]; ExplodePShape: PUBLIC PROC [shape: Shape, factor: REAL ¬ 1.0, f: Field]; InscribeShape: PUBLIC PROC [shape: Shape, alpha: REAL ¬ 0.5]; CutCornersShape: PUBLIC PROC [shape: Shape, alpha: REAL ¬ 0.5, corners: BOOL ¬ TRUE]; SplotchShape: PUBLIC PROC [shape: Shape, sides: INT ¬ 10, size: REAL ¬ 1.0]; FanShape: PUBLIC PROC [shape: Shape, alpha: REAL ¬ 0.5]; StarShape: PUBLIC PROC [shape: Shape, factor: REAL ¬ 0.5]; <> ExplodeV: PUBLIC SceneProc; <> <> ExplodeVShape: PUBLIC PROC [shape: Shape, factor: REAL ¬ 1.0, f: Field]; END.