GGBasicTypes.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on January 6, 1986 10:08:29 pm PST
Contents: Types which have long been stable and which everything relies on. Bier separated these from GGModelTypes to reduce compilation dependencies.
DIRECTORY
Imager;
GGBasicTypes: CEDAR DEFINITIONS =
BEGIN
Angle: TYPE = REAL;
Point: TYPE = Imager.VEC;
Matrix3by3: TYPE = ARRAY [1..3] OF ARRAY [1..3] OF REAL;
Vector: TYPE = Imager.VEC;
Edge: TYPE = REF EdgeObj;
EdgeObj: TYPE = RECORD [
line: Line, -- the line which passes through the endpoints of this edge
startIsFirst: BOOL,
start, end: Point];
Line: TYPE = REF LineObj;
LineObj: TYPE = RECORD [
Line equation of the form: y*cos(theta) - x*sin(theta) -d = 0,
where theta is the angle which the line makes with the x axis and d is the distance from the line to the origin.
theta: REAL, -- angle in (-pi..pi]
d: REAL, -- distance from line to origin
c: REAL, -- cos(theta). Cached for convenience.
s: REAL, -- sin(theta). Cached for convenience.
slope: REAL,
yInt: REAL -- for historical (Solidviews) reasons
];
Circle: TYPE = REF CircleObj;
CircleObj: TYPE = RECORD [
origin: Point,
radius: REAL
];
Arc: TYPE = REF ArcObj;
ArcObj: TYPE = RECORD [
circle: Circle,
ccw: BOOL,
p0, p2: Point, -- the arc is swept out by going counter-clockwise from p0 to p2
theta0, deltaTheta: REAL, -- theta0 is the angle at p0. theta0 + deltaTheta is the angle at p2.
edge: Edge -- if the arc is straight
];
Ray: TYPE = REF RayObj;
RayObj: TYPE = RECORD [
p: Point,
d: Vector];
BitVector: TYPE = REF BitVectorObj;
BitVectorObj: TYPE = RECORD [
bits: PACKED SEQUENCE len: NAT OF BOOL]; -- added PACKED. KAP February 28, 1986
BitMatrix: TYPE = REF BitMatrixObj; -- for SequenceObj. KAP April 4, 1986
BitMatrixObj: TYPE = RECORD [
vectors: SEQUENCE len: NAT OF BitVector];
SequenceOfReal: TYPE = REF SequenceOfRealObj;
SequenceOfRealObj: TYPE = RECORD [
reals: SEQUENCE len: NAT OF REAL];
BoundBox: TYPE = REF BoundBoxObj;
BoundBoxObj: TYPE = RECORD [loX, loY, hiX, hiY: REAL, null, infinite: BOOL];
END.