summaryrefslogtreecommitdiff
path: root/src/cgaladv.cc
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-10-31 01:58:50 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-10-31 01:58:50 (GMT)
commite0c5673e1bf965fbb1bbbef2562a54be1a3144a3 (patch)
tree5996824c15ccca985630ff07294a5b79158e4d86 /src/cgaladv.cc
parentb3f4c98c80acaa414f7bdacc86314d97267acba5 (diff)
Reverted accidental commits
git-svn-id: http://svn.clifford.at/openscad/trunk@573 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/cgaladv.cc')
-rw-r--r--src/cgaladv.cc43
1 files changed, 7 insertions, 36 deletions
diff --git a/src/cgaladv.cc b/src/cgaladv.cc
index e391ea8..829bc84 100644
--- a/src/cgaladv.cc
+++ b/src/cgaladv.cc
@@ -29,8 +29,6 @@
#include "builtin.h"
#include "printutils.h"
#include "cgal.h"
-#include "visitor.h"
-#include <sstream>
#ifdef ENABLE_CGAL
extern CGAL_Nef_polyhedron3 minkowski3(CGAL_Nef_polyhedron3 a, CGAL_Nef_polyhedron3 b);
@@ -54,21 +52,15 @@ public:
class CgaladvNode : public AbstractNode
{
public:
- CgaladvNode(const ModuleInstantiation *mi, cgaladv_type_e type) : AbstractNode(mi), type(type) {
- convexity = 1;
- }
- virtual ~CgaladvNode() { }
- virtual Response accept(const class State &state, Visitor &visitor) const {
- return visitor.visit(state, *this);
- }
- virtual std::string toString() const;
-
Value path;
QString subdiv_type;
int convexity, level;
cgaladv_type_e type;
+ CgaladvNode(const ModuleInstantiation *mi, cgaladv_type_e type) : AbstractNode(mi), type(type) {
+ convexity = 1;
+ }
#ifdef ENABLE_CGAL
- virtual CGAL_Nef_polyhedron renderCSGMesh() const;
+ virtual CGAL_Nef_polyhedron render_cgal_nef_polyhedron() const;
#endif
virtual CSGTerm *render_csg_term(double m[20], QVector<CSGTerm*> *highlights, QVector<CSGTerm*> *background) const;
virtual QString dump(QString indent) const;
@@ -136,7 +128,7 @@ void register_builtin_cgaladv()
#ifdef ENABLE_CGAL
-CGAL_Nef_polyhedron CgaladvNode::renderCSGMesh() const
+CGAL_Nef_polyhedron CgaladvNode::render_cgal_nef_polyhedron() const
{
QString cache_id = mk_cache_id();
if (cgal_nef_cache.contains(cache_id)) {
@@ -155,11 +147,11 @@ CGAL_Nef_polyhedron CgaladvNode::renderCSGMesh() const
if (v->modinst->tag_background)
continue;
if (first) {
- N = v->renderCsgMesh();
+ N = v->render_cgal_nef_polyhedron();
if (N.dim != 0)
first = false;
} else {
- CGAL_Nef_polyhedron tmp = v->renderCsgMesh();
+ CGAL_Nef_polyhedron tmp = v->render_cgal_nef_polyhedron();
if (N.dim == 3 && tmp.dim == 3) {
N.p3 = minkowski3(N.p3, tmp.p3);
}
@@ -232,24 +224,3 @@ QString CgaladvNode::dump(QString indent) const
return dump_cache;
}
-std::string CgaladvNode::toString() const
-{
- std::stringstream stream;
- stream << "n" << this->index() << ": ";
-
- switch (type) {
- case MINKOWSKI:
- stream << "minkowski(convexity = " << this->convexity << ")";
- break;
- case GLIDE:
- stream << "glide(path = " << this->path.dump() << ", convexity = " << this->convexity << ")";
- break;
- case SUBDIV:
- stream << "subdiv(level = " << this->level << ", convexity = " << this->convexity << ")";
- break;
- default:
- assert(false);
- }
-
- return stream.str();
-}
contact: Jan Huwald // Impressum