diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-11 09:07:18 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-11 09:07:18 (GMT) |
commit | d25e197ac7d72214bbdc2753ef84104932c625dd (patch) | |
tree | d0496a0b6679c415e0b2c4c0089e066d8eb181b9 /src/CGALCache.cc | |
parent | 95949cf961d84f65ad9bfb9f2dec7361059ca515 (diff) |
Forgot to commit CGALCache class
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()); +} |