summaryrefslogtreecommitdiff
path: root/csgops.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-01 09:48:25 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-07-01 09:48:25 (GMT)
commit82fad98cb63d6e27e7c156d4c5e4c9a9847abfd1 (patch)
treed70ff76ec4f5138706df5cb11fd034e60d927f4d /csgops.cc
parent27ecd0b1d0bf0114b465beeb4db482f0f1f87c52 (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 'csgops.cc')
-rw-r--r--csgops.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/csgops.cc b/csgops.cc
index 6d625f7..12c6875 100644
--- a/csgops.cc
+++ b/csgops.cc
@@ -33,14 +33,14 @@ class CsgModule : public AbstractModule
public:
csg_type_e type;
CsgModule(csg_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 CsgNode : public AbstractNode
{
public:
csg_type_e type;
- CsgNode(csg_type_e type) : type(type) { }
+ CsgNode(const ModuleInstanciation *mi, csg_type_e type) : AbstractNode(mi), type(type) { }
#ifdef ENABLE_CGAL
virtual CGAL_Nef_polyhedron render_cgal_nef_polyhedron() const;
#endif
@@ -48,11 +48,11 @@ public:
virtual QString dump(QString indent) const;
};
-AbstractNode *CsgModule::evaluate(const Context*, const QVector<QString>&, const QVector<Value>&, const QVector<ModuleInstanciation*> arg_children, const Context *arg_context) const
+AbstractNode *CsgModule::evaluate(const Context*, const ModuleInstanciation *inst) const
{
- CsgNode *node = new CsgNode(type);
- foreach (ModuleInstanciation *v, arg_children) {
- AbstractNode *n = v->evaluate(arg_context);
+ CsgNode *node = new CsgNode(inst, type);
+ foreach (ModuleInstanciation *v, inst->children) {
+ AbstractNode *n = v->evaluate(inst->ctx);
if (n != NULL)
node->children.append(n);
}
contact: Jan Huwald // Impressum