56 void BackFaceCullingOptimizer::optimize(std::vector<PtrPrimitive>& primitives_tab,
VRenderParams&)
61 for(
unsigned int i=0;i<primitives_tab.size();++i)
62 if((P = dynamic_cast<Polygone *>(primitives_tab[i])) != NULL)
67 delete primitives_tab[i] ;
68 primitives_tab[i] = NULL ;
77 for(
unsigned int k=0;k<primitives_tab.size();++k)
78 if(primitives_tab[k] != NULL)
79 primitives_tab[j++] = primitives_tab[k] ;
81 primitives_tab.resize(j) ;
83 cout <<
"Backface culling: " << nb_culled <<
" polygons culled." << endl ;
virtual unsigned int nbVertices() const
virtual const Vector3 & vertex(int) const