diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-08-04 18:55:25 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-08-04 18:55:25 (GMT) |
commit | cf190ff46ee1ce6ffa68ae932682b27438badc91 (patch) | |
tree | fa4ebb74f0f737566755a5da816a30fe388c74d2 /csgops.cc | |
parent | cc803576dcc4810d1ba415895b83ac9a3079de2f (diff) |
Stefan Farthofer (aka meta/metaz):
Renamed some enums to avoid collitions with windows.h defines
git-svn-id: http://svn.clifford.at/openscad/trunk@86 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'csgops.cc')
-rw-r--r-- | csgops.cc | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -23,9 +23,9 @@ #include "openscad.h" enum csg_type_e { - UNION, - DIFFERENCE, - INTERSECTION + CSG_TYPE_UNION, + CSG_TYPE_DIFFERENCE, + CSG_TYPE_INTERSECTION }; class CsgModule : public AbstractModule @@ -77,11 +77,11 @@ CGAL_Nef_polyhedron CsgNode::render_cgal_nef_polyhedron() const if (first) { N = v->render_cgal_nef_polyhedron(); first = false; - } else if (type == UNION) { + } else if (type == CSG_TYPE_UNION) { N += v->render_cgal_nef_polyhedron(); - } else if (type == DIFFERENCE) { + } else if (type == CSG_TYPE_DIFFERENCE) { N -= v->render_cgal_nef_polyhedron(); - } else if (type == INTERSECTION) { + } else if (type == CSG_TYPE_INTERSECTION) { N *= v->render_cgal_nef_polyhedron(); } } @@ -101,12 +101,12 @@ CSGTerm *CsgNode::render_csg_term(double m[16], QVector<CSGTerm*> *highlights, Q if (t2 && !t1) { t1 = t2; } else if (t2 && t1) { - if (type == UNION) { - t1 = new CSGTerm(CSGTerm::UNION, t1, t2); - } else if (type == DIFFERENCE) { - t1 = new CSGTerm(CSGTerm::DIFFERENCE, t1, t2); - } else if (type == INTERSECTION) { - t1 = new CSGTerm(CSGTerm::INTERSECTION, t1, t2); + if (type == CSG_TYPE_UNION) { + t1 = new CSGTerm(CSGTerm::TYPE_UNION, t1, t2); + } else if (type == CSG_TYPE_DIFFERENCE) { + t1 = new CSGTerm(CSGTerm::TYPE_DIFFERENCE, t1, t2); + } else if (type == CSG_TYPE_INTERSECTION) { + t1 = new CSGTerm(CSGTerm::TYPE_INTERSECTION, t1, t2); } } } @@ -123,11 +123,11 @@ QString CsgNode::dump(QString indent) const { if (dump_cache.isEmpty()) { QString text = indent + QString("n%1: ").arg(idx); - if (type == UNION) + if (type == CSG_TYPE_UNION) text += "union() {\n"; - if (type == DIFFERENCE) + if (type == CSG_TYPE_DIFFERENCE) text += "difference() {\n"; - if (type == INTERSECTION) + if (type == CSG_TYPE_INTERSECTION) text += "intersection() {\n"; foreach (AbstractNode *v, children) text += v->dump(indent + QString("\t")); @@ -138,8 +138,8 @@ QString CsgNode::dump(QString indent) const void register_builtin_csgops() { - builtin_modules["union"] = new CsgModule(UNION); - builtin_modules["difference"] = new CsgModule(DIFFERENCE); - builtin_modules["intersection"] = new CsgModule(INTERSECTION); + builtin_modules["union"] = new CsgModule(CSG_TYPE_UNION); + builtin_modules["difference"] = new CsgModule(CSG_TYPE_DIFFERENCE); + builtin_modules["intersection"] = new CsgModule(CSG_TYPE_INTERSECTION); } |