Local Types
SurfaceDescription: TYPE ~ REF SurfaceDescriptionRep;
SurfaceDescriptionRep:
TYPE ~
RECORD [
open: BOOL ¬ FALSE
];
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
];
BlendType: TYPE ~ {straight, smooth, cyclic};
SubdivisionType: TYPE ~ {none, halfTriangulate, quarterTriangulate};
FileType: TYPE ~ {shape, path, scale, rotate, translate};
ShapeBlendProc:
TYPE ~
PROC [
t: REAL,
blend: BlendType ¬ smooth,
clientData: REF ANY ¬ NIL
] RETURNS [Shape];
PathProc:
TYPE ~
PROC [
t: REAL,
blend: BlendType ¬ smooth,
clientData: REF ANY ¬ NIL
] RETURNS [Matrix];
ScaleProc:
TYPE ~
PROC [
t: REAL,
blend: BlendType ¬ smooth,
clientData: REF ANY ¬ NIL
] RETURNS [Triple];
RotateProc:
TYPE ~
PROC [
t: REAL,
blend: BlendType ¬ smooth,
clientData: REF ANY ¬ NIL
] RETURNS [AxisAngle];
TranslateProc:
TYPE ~
PROC [
t: REAL,
blend: BlendType ¬ smooth,
clientData: REF ANY ¬ NIL
] RETURNS [Triple];
XformProc:
TYPE ~
PROC [
t: REAL,
blend: BlendType ¬ smooth,
clientData: REF ANY ¬ NIL
] RETURNS [Matrix];
KeyData: TYPE ~ REF KeyDataRep;
KeyDataRep:
TYPE ~
RECORD [
alpha: REAL ¬ -1.0,
rope: ROPE ¬ NIL,
real: REAL ¬ 0.0,
triple: Triple ¬ [0.0, 0.0, 0.0],
quaternion: Quaternion,
next, prev: KeyData ¬ NIL
];
KeyList: TYPE ~ REF KeyListRep;
KeyListRep:
TYPE ~
RECORD [
type: BlendType ¬ smooth,
tube: Tube,
knots: TripleSequence,
keys: KeyData
];
Impl Procs
Support for KeyLists From Files and Streams
KeyListFromFile: PUBLIC PROC [filename: ROPE, type: FileType, b: BlendType] RETURNS [KeyList];
KeyListFromStream: PUBLIC PROC [stream: STREAM, type: FileType, b: BlendType] RETURNS [KeyList];
Shape Blending And Combining Procedures
Merge2Shapes: PUBLIC PROC [s1, s2: Shape, addPolys: BOOL ¬ TRUE] RETURNS [s: Shape];
Polygon To Shape Utility Procedures
AddTriangleToShape: PUBLIC PROC [shape: Shape, v0, v1, v2: INT];
AddGeneralQuadrilateralToShape:
PUBLIC PROC [
shape: Shape,
v0, v1, v2, v3: INT,
op: SubdivisionType ¬ none
];
Simple Sweep Setup Procedures
SimpleSetupShapeBlendProc: PUBLIC PROC [lo, hi: ROPE] RETURNS [REF ANY];
SimpleSetupRotateProc: PUBLIC PROC [lo, hi: AxisAngle] RETURNS [REF ANY];
SimpleSetupPathProc: PUBLIC PROC [lo, hi: Triple] RETURNS [REF ANY];
SimpleSetupScaleProc: PUBLIC PROC [lo, hi: Triple] RETURNS [REF ANY];
SimpleSetupTranslateProc: PUBLIC PROC [lo, hi: Triple] RETURNS [REF ANY];
Sweep Default Setup Procedures
SetupDefaultShapeBlendProc: PUBLIC PROC [f: ROPE, b: BlendType] RETURNS [REF ANY];
SetupDefaultPathProc: PUBLIC PROC [f: ROPE, b: BlendType] RETURNS [REF ANY];
SetupDefaultScaleProc: PUBLIC PROC [f: ROPE, b: BlendType] RETURNS [REF ANY];
SetupDefaultRotateProc: PUBLIC PROC [f: ROPE, b: BlendType] RETURNS [REF ANY];
SetupDefaultTranslateProc: PUBLIC PROC [f: ROPE, b: BlendType] RETURNS [REF ANY];
Sweep Default Evaluation Procedures
DefaultShapeBlendProc: PUBLIC ShapeBlendProc;
DefaultPathProc: PUBLIC PathProc;
DefaultScaleProc: PUBLIC ScaleProc;
DefaultRotateProc: PUBLIC RotateProc;
DefaultTranslateProc: PUBLIC TranslateProc;
Sweep Construction
MakeSweepShape:
PUBLIC PROC [
shapeProc: ShapeBlendProc,
shapeData: REF ANY ¬ NIL,
shapeBlend: BlendType ¬ smooth,
pathProc: PathProc ¬ NIL,
pathData: REF ANY ¬ NIL,
pathBlend: BlendType ¬ smooth,
scaleProc: ScaleProc ¬ NIL,
scaleData: REF ANY ¬ NIL,
scaleBlend: BlendType ¬ smooth,
rotateProc: RotateProc ¬ NIL,
rotateData: REF ANY ¬ NIL,
rotateBlend: BlendType ¬ smooth,
translateProc: TranslateProc ¬ NIL,
translateData: REF ANY ¬ NIL,
translateBlend: BlendType ¬ smooth,
xformProc: XformProc ¬ NIL,
xformData: REF ANY ¬ NIL,
xformBlend: BlendType ¬ smooth,
steps: INT ¬ 10,
tLo: REAL ¬ 0.0,
tHi: REAL ¬ 1.0,
firstInstance: BOOL ¬ FALSE,
lastInstance: BOOL ¬ FALSE,
reverseFirstInstance: BOOL ¬ FALSE,
reverseLastInstance: BOOL ¬ TRUE,
anchor: BOOL ¬ FALSE,
instance: BOOL ¬ TRUE,
connect: BOOL ¬ TRUE,
localXSections: BOOL ¬ FALSE,
tubeTexture: BOOL ¬ TRUE,
close: BOOL ¬ FALSE
] RETURNS [Shape];