25 void gsSurface<T>::toMesh(gsMesh<T> & msh,
int npoints)
const
27 const gsMatrix<T> param = this->parameterRange();
29 gsGridIterator<T,CUBE> pIter(param, npoints);
32 this->eval_into( *pIter, cp);
36 const typename gsGridIterator<T,CUBE>::point_index np = pIter.numPointsCwise();
37 for(
index_t j = 0; j + 1 != np[1]; j++)
38 for(
index_t i= 0; i + 1 != np[0]; i++)
40 const index_t ind1 = j * np[0] + i;
41 const index_t ind2 = ind1 + np[0];
43 msh.addFace(ind1 , ind1+1, ind2+1);
44 msh.addFace(ind2+1, ind2 , ind1 );
#define index_t
Definition: gsConfig.h:32
Provides declaration of the Mesh class.
Provides iteration over integer or numeric points in a (hyper-)cube.