Ejemplo n.º 1
0
Cache::i_Primitive CGALCache::hashPrimitive(CGALPrimitive* cg)
{
    i_PointList pi;
    foreach(CGAL::Point3 pt, cg->getCGALPoints())
        pi.append(hashPoint(pt));

    i_PolygonList pgi;
    foreach(CGALPolygon* pg, cg->getCGALPolygons())
        pgi.append(hashPolygon(pg));

    return i_Primitive(pi,pgi);
}
Ejemplo n.º 2
0
Cache::i_Primitive Cache::hashPrimitive(Primitive* pr)
{
	i_PointList pi;
	foreach(Point pt, pr->getPoints())
		pi.append(hashPoint(pt));

	i_PolygonList pgi;
	foreach(Polygon* pg, pr->getPolygons())
		pgi.append(hashPolygon(pg));

	return i_Primitive(pi,pgi);
}