56 void BackFaceCullingOptimizer::optimize(std::vector<PtrPrimitive>& primitives_tab,
VRenderParams&)
61 for(
size_t 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(
size_t 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 size_t nbVertices() const
virtual const Vector3 & vertex(size_t) const