summaryrefslogtreecommitdiff
path: root/src/CGALCache.cc
blob: 6bdad41343a458a3e6fe22c1b1de2a4103aab3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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());
}
contact: Jan Huwald // Impressum