Example #1
0
///////////////////////////////////////////////////////
// Go over the list of old trees, and for each one of
// them push down their data onto the new trees
///////////////////////////////////////////////////////
void pushDownList(clusterList* rootList)
{
  while(rootList->head != NULL)
    {
      cluster* cl = removeCluster(rootList);
      pushDown(cl);
      freeBlock(currentTree->UClusters,(char*) cl);
      deprintf("done 1\n");
    }
  deprintf("done\n");
}
Example #2
0
bool Round::ClusterList::removeCluster(const std::string &name) {
  Cluster *foundCluster = NULL;

  for (ClusterList::iterator cluster = begin(); cluster != end(); cluster++) {
    if ((*cluster)->isName(name)) {
      foundCluster = (*cluster);
      break;
    }
  }

  if (!foundCluster)
    return false;

  return removeCluster(foundCluster);
}
Example #3
0
/////////////////////////////////////////////////////////////////
// To do the data propagation travese each new tree, and do a 
// post-order update.
/////////////////////////////////////////////////////////////////
cluster* syncList(clusterList* rootList)
{
  cluster* cl=NULL;
  int odebug = debug;
  //debug =1;
  while(rootList->head != NULL)
    {
      deprintf("Synch \n");
      cl = removeCluster(rootList);
      synchronizeClusterContract(cl);
      deprintf("done 1\n");
    }
  debug = odebug;
  deprintf("done\n");
  return cl;
}
Example #4
0
bool ClusterMesh::readFile(const char* filename)
{
	if (filename==NULL)
		return false;
	mesh.clear();
	bool result=OpenMesh::IO::read_mesh(mesh, filename);

	// some debug information
	std::cout << "faces: "<< mesh.n_faces()<<std::endl;
	std::cout << "vertices: "<< mesh.n_vertices()<<std::endl;
	std::cout << "edges: "<< mesh.n_edges()<<std::endl;

	// precomputing step
	removeCluster();
	mesh.update_face_normals();
	mesh.update_vertex_normals();
	computeBoundingBox();
	computeFaceCenter();
	computeDualEdgeLength();
	computeEdgeAngle();
	computeEdgeCost();
	return result;
}