#include "cylinder.h" #include #include #include template IGL_INLINE void igl::cylinder( const int axis_devisions, const int height_devisions, Eigen::PlainObjectBase & V, Eigen::PlainObjectBase & F) { V.resize(axis_devisions*height_devisions,3); F.resize(2*(axis_devisions*(height_devisions-1)),3); int f = 0; typedef typename DerivedV::Scalar Scalar; for(int th = 0;th 0) { F(f,0) = ((th+0)%axis_devisions)+(h-1)*axis_devisions; F(f,1) = ((th+1)%axis_devisions)+(h-1)*axis_devisions; F(f,2) = ((th+0)%axis_devisions)+(h+0)*axis_devisions; f++; F(f,0) = ((th+1)%axis_devisions)+(h-1)*axis_devisions; F(f,1) = ((th+1)%axis_devisions)+(h+0)*axis_devisions; F(f,2) = ((th+0)%axis_devisions)+(h+0)*axis_devisions; f++; } } } assert(f == F.rows()); } #ifdef IGL_STATIC_LIBRARY template void igl::cylinder, Eigen::Matrix >(int, int, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #endif