using namespace HDK_Sample;
int EUC_Expression::ourEvaluateTime = 0;
{
myRefCount = 0;
myUid = ourExpressionList.
size();
myLastEvaluateTime = 0;
myCd = 1;
myVisible = true;
ourExpressionList.
append(
this);
}
{
ourExpressionList(
getUid()) = 0;
}
void
{
myRefCount++;
}
void
{
myRefCount--;
if (myRefCount <= 0)
delete this;
}
{
if (uid < 0 || uid >= ourExpressionList.
size())
return 0;
return ourExpressionList(uid);
}
void
{
myVisible = visible;
myCd = cd;
}
void
{
}
void
{
ourEvaluateTime++;
}
void
{
if (myLastEvaluateTime == ourEvaluateTime)
{
result = myObjectCache;
return;
}
myLastEvaluateTime = ourEvaluateTime;
result = myObjectCache;
}
{
myPos = pos;
}
void
{
}
{
myIndex = idx;
}
EUC_ExprPointFromObject::~EUC_ExprPointFromObject()
{
}
void
{
bool haspos;
{
obj = objlist(i);
haspos = false;
{
{
haspos = true;
}
break;
{
haspos = true;
}
break;
}
if (haspos)
{
}
}
}
{
myPtA = pta;
myPtB = ptb;
}
EUC_ExprLineFromPoints::~EUC_ExprLineFromPoints()
{
}
void
{
{
{
}
}
}
{
myPoint = pt;
}
EUC_ExprCircleFromPoints::~EUC_ExprCircleFromPoints()
{
}
void
{
{
{
}
}
}
{
myExprA = expra;
myExprB = exprb;
}
EUC_ExprIntersect::~EUC_ExprIntersect()
{
}
void
{
{
if (ptalist(i)->getType() < ptblist(i)->getType())
{
obja = ptalist(i);
objb = ptblist(i);
}
else
{
objb = ptalist(i);
obja = ptblist(i);
}
{
continue;
}
{
{
int retcode;
v1 -= p1;
v2 -= p2;
if (retcode != -1)
{
pos = isect;
}
}
else
{
float radius,
a,
b,
c, t0, t1;
v -= p;
c =
dot(center, center) - radius*radius;
{
}
}
}
else
{
float rA, rB,
t, d, hA2, hB2;
v = cB;
v -= cA;
{
t = (rA*rA - rB*rB + d*d) / (2.0 * d);
hB2 = rB*rB - (t-d)*(t-d);
if (hA2 >= 0 && hB2 >= 0)
{
hA2 = SYSsqrt(hA2);
pos = cA + t * v + hA2 * perpv;
pos = cA + t * v - hA2 * perpv;
}
}
}
}
}
{
myIndex = idx;
}
EUC_ExprSelect::~EUC_ExprSelect()
{
}
void
{
}