SFO.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Michael Plass, August 14, 1986 4:16:16 pm PDT
Out-of-line versions of SF.mesa procedures, for use in debugger.
DIRECTORY SF;
SFO: CEDAR PROGRAM IMPORTS SF
~ BEGIN
Vec operations
Vec: TYPE ~ SF.Vec;
Box: TYPE ~ SF.Box;
minVec: Vec ~ SF.minVec;
maxVec: Vec ~ SF.maxVec;
zeroVec: Vec ~ SF.zeroVec;
NonNegative: PROC [v: Vec] RETURNS [Vec] ~ { RETURN [SF.NonNegative[v]] };
Neg: PROC [v: Vec] RETURNS [Vec] ~ { RETURN [SF.Neg[v]] };
Add: PROC [v1, v2: Vec] RETURNS [Vec] ~ { RETURN [SF.Add[v1, v2]] };
Sub: PROC [v1, v2: Vec] RETURNS [Vec] ~ { RETURN [SF.Sub[v1, v2]] };
Min: PROC [v1, v2: Vec] RETURNS [Vec] ~ { RETURN [SF.Min[v1, v2]] };
Min3: PROC [v1, v2, v3: Vec] RETURNS [Vec] ~ { RETURN [SF.Min3[v1, v2, v3]] };
Max: PROC [v1, v2: Vec] RETURNS [Vec] ~ { RETURN [SF.Max[v1, v2]] };
Max3: PROC [v1, v2, v3: Vec] RETURNS [Vec] ~ { RETURN [SF.Max3[v1, v2, v3]] };
Eq: PROC [v1, v2: Vec] RETURNS [BOOL] ~ { RETURN [SF.Eq[v1, v2]] };
Lt: PROC [v1, v2: Vec] RETURNS [BOOL] ~ { RETURN [SF.Lt[v1, v2]] };
Le: PROC [v1, v2: Vec] RETURNS [BOOL] ~ { RETURN [SF.Le[v1, v2]] };
Gt: PROC [v1, v2: Vec] RETURNS [BOOL] ~ { RETURN [SF.Gt[v1, v2]] };
Ge: PROC [v1, v2: Vec] RETURNS [BOOL] ~ { RETURN [SF.Ge[v1, v2]] };
Box operations
maxBox: Box ~ [min: minVec, max: maxVec];
BoxAction: TYPE ~ PROC [box: Box];
BoxGenerator: TYPE ~ PROC [boxAction: BoxAction];
Nonempty: PROC [box: Box] RETURNS [BOOL] ~ { RETURN [SF.Nonempty[box]] };
Empty: PROC [box: Box] RETURNS [BOOL] ~ { RETURN [SF.Empty[box]] };
Intersect: PROC [box1, box2: Box] RETURNS [Box] ~ { RETURN [SF.Intersect[box1, box2]] };
Disjoint: PROC [box1, box2: Box] RETURNS [BOOL] ~ { RETURN [SF.Disjoint[box1, box2]] };
SizeF: PROC [box: Box] RETURNS [CARDINAL] ~ { RETURN [SF.SizeF[box]] };
SizeS: PROC [box: Box] RETURNS [CARDINAL] ~ { RETURN [SF.SizeS[box]] };
Size: PROC [box: Box] RETURNS [Vec] ~ { RETURN [SF.Size[box]] };
Inside: PROC [inner, outer: Box] RETURNS [BOOL] ~ { RETURN [SF.Inside[inner, outer]] };
Displace: PROC [box: Box, t: Vec] RETURNS [Box] ~ { RETURN [SF.Displace[box, t]] };
In: PROC [vec: Vec, box: Box] RETURNS [BOOL] ~ { RETURN [SF.In[vec, box]] };
END.