summaryrefslogtreecommitdiff
path: root/src/csgtermnormalizer.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-26 18:15:51 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-26 18:15:51 (GMT)
commitbc3454f369a21cd689f42f5e9ec5cb316f9ebdd5 (patch)
tree9794056684d42b7dd4b955160c6e83fa694e0729 /src/csgtermnormalizer.h
parent9e6cc9cebbfd5007a5fa9afabf57476676357193 (diff)
Refactored normalization into a separate class, hard-limited normalization to stop at 5000 nodes to keep from normalizing 'forever'
Diffstat (limited to 'src/csgtermnormalizer.h')
-rw-r--r--src/csgtermnormalizer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/csgtermnormalizer.h b/src/csgtermnormalizer.h
new file mode 100644
index 0000000..df37441
--- /dev/null
+++ b/src/csgtermnormalizer.h
@@ -0,0 +1,22 @@
+#ifndef CSGTERMNORMALIZER_H_
+#define CSGTERMNORMALIZER_H_
+
+#include "memory.h"
+
+class CSGTermNormalizer
+{
+public:
+ CSGTermNormalizer() : counter(0) {}
+ ~CSGTermNormalizer() {}
+
+ shared_ptr<class CSGTerm> normalize(const shared_ptr<CSGTerm> &term);
+
+private:
+ shared_ptr<CSGTerm> normalizePass(shared_ptr<CSGTerm> term) ;
+ bool normalize_tail(shared_ptr<CSGTerm> &term);
+ int count(const shared_ptr<CSGTerm> &term) const;
+
+ int counter;
+};
+
+#endif
contact: Jan Huwald // Impressum