diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-01 09:48:25 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-01 09:48:25 (GMT) |
commit | 82fad98cb63d6e27e7c156d4c5e4c9a9847abfd1 (patch) | |
tree | d70ff76ec4f5138706df5cb11fd034e60d927f4d /primitives.cc | |
parent | 27ecd0b1d0bf0114b465beeb4db482f0f1f87c52 (diff) |
Clifford Wolf:
Yet another redesign of the evaluation path
git-svn-id: http://svn.clifford.at/openscad/trunk@44 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'primitives.cc')
-rw-r--r-- | primitives.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/primitives.cc b/primitives.cc index 6954e87..4494b03 100644 --- a/primitives.cc +++ b/primitives.cc @@ -33,7 +33,7 @@ class PrimitiveModule : public AbstractModule public: primitive_type_e type; PrimitiveModule(primitive_type_e type) : type(type) { } - virtual AbstractNode *evaluate(const Context *ctx, const QVector<QString> &call_argnames, const QVector<Value> &call_argvalues, const QVector<ModuleInstanciation*> arg_children, const Context *arg_context) const; + virtual AbstractNode *evaluate(const Context *ctx, const ModuleInstanciation *inst) const; }; class PrimitiveNode : public AbstractPolyNode @@ -43,14 +43,14 @@ public: double x, y, z, h, r1, r2; double fn, fs, fa; primitive_type_e type; - PrimitiveNode(primitive_type_e type) : type(type) { } + PrimitiveNode(const ModuleInstanciation *mi, primitive_type_e type) : AbstractPolyNode(mi), type(type) { } virtual PolySet *render_polyset(render_mode_e mode) const; virtual QString dump(QString indent) const; }; -AbstractNode *PrimitiveModule::evaluate(const Context *ctx, const QVector<QString> &call_argnames, const QVector<Value> &call_argvalues, const QVector<ModuleInstanciation*>, const Context*) const +AbstractNode *PrimitiveModule::evaluate(const Context *ctx, const ModuleInstanciation *inst) const { - PrimitiveNode *node = new PrimitiveNode(type); + PrimitiveNode *node = new PrimitiveNode(inst, type); node->center = false; node->x = node->y = node->z = node->h = node->r1 = node->r2 = 1; @@ -69,7 +69,7 @@ AbstractNode *PrimitiveModule::evaluate(const Context *ctx, const QVector<QStrin } Context c(ctx); - c.args(argnames, argexpr, call_argnames, call_argvalues); + c.args(argnames, argexpr, inst->argnames, inst->argvalues); node->fn = c.lookup_variable("$fn").num; node->fs = c.lookup_variable("$fs").num; |