Beispiel #1
0
 vector<ViewShape*> GetOccludersF1D::operator()(Interface1D& inter) {
   vector<ViewShape*> shapesVector;
   set<ViewShape*> shapesSet;
   ViewEdge* ve = dynamic_cast<ViewEdge*>(&inter);
   if (ve){
     return ve->occluders();
   }else{
     Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd();
     for(;it!=itend;++it){
       Functions0D::getOccludersF0D(it, shapesSet);
     }
     shapesVector.insert(shapesVector.begin(), shapesSet.begin(), shapesSet.end());
   }
   return shapesVector;
 }
void getOccludersF1D(Interface1D& inter, set<ViewShape*>& oShapes)
{
	ViewEdge *ve = dynamic_cast<ViewEdge*>(&inter);
	if (ve) {
		vector<ViewShape*>& occluders = ve->occluders();
		oShapes.insert<vector<ViewShape*>::iterator>(occluders.begin(), occluders.end());
	}
	else {
		Interface0DIterator it = inter.verticesBegin(), itend = inter.verticesEnd();
		for (; it != itend; ++it) {
			set<ViewShape*> shapes;
			Functions0D::getOccludersF0D(it, shapes);
			for (set<ViewShape*>::iterator s = shapes.begin(), send = shapes.end(); s != send; ++s)
				oShapes.insert(*s);
		}
	}
}