blob: 84de7224de3629f9cb2e608548cd53c9264f096b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#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());
#ifdef DEBUG
PRINTF("CGAL Cache insert: %s (%d verts)", id.substr(0, 40).c_str(), N.weight());
#endif
}
void CGALCache::print()
{
PRINTF("CGAL Polyhedrons in cache: %d", this->cache.size());
PRINTF("Vertices in cache: %d", this->cache.totalCost());
}
|