diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-12 22:40:51 (GMT) |
commit | f5f06c8e976ca45aebea42fe8c04bf7404357ac8 (patch) | |
tree | 8d0cdd2698e7806c1b12cc49e743b561e1082961 /src/CGALCache.cc | |
parent | 007c40848db9efd704694f2e7596cabed80da50f (diff) | |
parent | 5ac9162f1c67fd21737ead11d7ebc638bf4eef5f (diff) |
merge
Merge remote branch 'upstream/visitor' into visitortests
Conflicts:
src/export.cc
src/openscad.cc
src/polyset.cc
src/transform.cc
tests/CMakeLists.txt
tests/FindGLEW.cmake
tests/csgtermtest.cc
Diffstat (limited to 'src/CGALCache.cc')
-rw-r--r-- | src/CGALCache.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/CGALCache.cc b/src/CGALCache.cc new file mode 100644 index 0000000..6bdad41 --- /dev/null +++ b/src/CGALCache.cc @@ -0,0 +1,17 @@ +#include "CGALCache.h" +#include "printutils.h" +#include "CGAL_Nef_polyhedron.h" + +CGALCache *CGALCache::inst = NULL; + +void CGALCache::insert(const std::string &id, const CGAL_Nef_polyhedron &N) +{ + this->cache.insert(id, new CGAL_Nef_polyhedron(N), N.weight()); + PRINTF("CGAL Cache insert: %s (%d verts)", id.substr(0, 40).c_str(), N.weight()); +} + +void CGALCache::print() +{ + PRINTF("CGAL Polyhedrons in cache: %d", this->cache.size()); + PRINTF("Vertices in cache: %d", this->cache.totalCost()); +} |