ImplicitPrimitives.mesa
Copyright Ó 1990 by Xerox Corporation. All rights reserved.
Bloomenthal, August 11, 1992 4:07 pm PDT
DIRECTORY G3dBasic, G3dMatrix, G3dTool, Imager;
ImplicitPrimitives: CEDAR DEFINITIONS
~ BEGIN
Quad:     TYPE ~ G3dBasic.Quad;
Segment:    TYPE ~ G3dBasic.Segment;
Triple:    TYPE ~ G3dBasic.Triple;
Matrix:    TYPE ~ G3dMatrix.Matrix;
Context:    TYPE ~ Imager.Context;
Ellipsoid
Ellipsoid:    TYPE ~ REF EllipsoidRep;
EllipsoidRep:   TYPE ~ RECORD [
x, y, z:      Segment ¬ [],
m:        Matrix ¬ NIL,
aTerm, bTerm, cTerm:  REAL ¬ 0.0,
acc:       Quad ¬ []
];
EllipsoidDraw: PROC [e: Ellipsoid, context: Context, view: G3dTool.View];
Draw the ellipsoid.
EllipsoidMake: PROC [
p0, p1: Triple,
lengthScale, widthScale, heightScale: REAL ¬ 1.0,
refVec: Triple ¬ []]
RETURNS [Ellipsoid];
Make ellipsoid given two focci, scales for length, width and height, and a reference vector.
EllipsoidValue: PROC [q: Triple, e: Ellipsoid] RETURNS [REAL];
Return the implicit value of the ellipsoid e given the query point q.
END.