36 using namespace HDK_Sample;
39 int EUC_Expression::ourEvaluateTime = 0;
47 myUid = ourExpressionList.
size();
48 myLastEvaluateTime = 0;
51 ourExpressionList.
append(
this);
57 ourExpressionList(
getUid()) = 0;
78 if (uid < 0 || uid >= ourExpressionList.
size())
81 return ourExpressionList(uid);
114 if (myLastEvaluateTime == ourEvaluateTime)
116 result = myObjectCache;
120 myLastEvaluateTime = ourEvaluateTime;
123 result = myObjectCache;
176 for (i = 0; i <
n; i++)
239 for (i = 0; i <
n; i++)
286 for (i = 0; i <
n; i++)
334 for (i = 0; i <
n; i++)
337 if (ptalist(i)->getType() < ptblist(i)->getType())
391 float radius,
a,
b,
c, t0, t1;
413 b = 2 *
dot(v, center);
414 c =
dot(center, center) - radius*radius;
446 float rA, rB,
t, d, hA2, hB2;
460 t = (rA*rA - rB*rB + d*d) / (2.0 * d);
464 hB2 = rB*rB - (t-d)*(t-d);
465 if (hA2 >= 0 && hB2 >= 0)
474 pos = cA + t * v + hA2 * perpv;
480 pos = cA + t * v - hA2 * perpv;
void applyLook(EUC_Object *obj)
virtual ~EUC_Expression()
void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj) override
void setPt(int idx, const UT_Vector2 &pt)
EUC_Expression * myCenter
void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj) override
~EUC_ExprCircleFromPoints() override
static EUC_Expression * getExprFromUid(int uid)
void evaluate(EUC_ObjectList &results)
GLboolean GLboolean GLboolean GLboolean a
EUC_ExprLineFromPoints(EUC_Expression *pta, EUC_Expression *ptb)
~EUC_ExprIntersect() override
EUC_ExprIntersect(EUC_Expression *expra, EUC_Expression *exprb)
**But if you need a result
GLfloat GLfloat GLfloat v2
EUC_ExprPointFromObject(EUC_Expression *src, int idx)
void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj) override
void setSize(exint newsize)
EUC_Expression * mySource
virtual void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj)=0
constexpr SYS_FORCE_INLINE T & x() noexcept
void setLook(bool visible, const UT_Vector3 &cd)
constexpr SYS_FORCE_INLINE T length() const noexcept
int lineIntersect(const UT_Vector3T< T > &p1, const UT_Vector3T< T > &v1, const UT_Vector3T< T > &p2, const UT_Vector3T< T > &v2)
fpreal64 dot(const CE_VectorT< T > &a, const CE_VectorT< T > &b)
virtual EUC_ObjType getType() const =0
~EUC_ExprPointFromObject() override
GLboolean GLboolean GLboolean b
EUC_ExprCircleFromPoints(EUC_Expression *center, EUC_Expression *pt)
bool SYSequalZero(const UT_Vector3T< T > &v)
void assign(T xx=0.0f, T yy=0.0f, T zz=0.0f)
Set the values of the vector components.
void setLook(bool visible, const UT_Vector3 &cd)
EUC_Expression * mySource
void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj) override
~EUC_ExprLineFromPoints() override
EUC_ExprPoint(const UT_Vector2 &pos)
void evaluateRecurse(EUC_ObjectList &result, EUC_ObjectList &totalobj)
EUC_ExprSelect(EUC_Expression *src, int idx)
void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj) override
static int quadratic(T a, T b, T c, T &v0, T &v1)
SYS_FORCE_INLINE UT_StorageMathFloat_t< T > normalize() noexcept
~EUC_ExprSelect() override
constexpr SYS_FORCE_INLINE T & y() noexcept
void evaluateSubclass(EUC_ObjectList &result, EUC_ObjectList &totalobj) override