1234567891011121314151617181920212223242526272829303132333435 |
- #include "write.h"
- #include "writeOBJ.h"
- #include "writeOFF.h"
- #include <iostream>
- template <typename DerivedV, typename DerivedF>
- IGL_INLINE bool igl::write(
- const std::string str,
- const Eigen::PlainObjectBase<DerivedV>& V,
- const Eigen::PlainObjectBase<DerivedF>& F)
- {
- using namespace std;
- const char* p;
- for (p = str.c_str(); *p != '\0'; p++)
- ;
- while (*p != '.')
- p--;
-
- if (!strcmp(p, ".obj") || !strcmp(p, ".OBJ"))
- return igl::writeOBJ(str,V,F);
-
- if (!strcmp(p, ".off") || !strcmp(p, ".OFF"))
- return igl::writeOFF(str,V,F);
- cerr<<"^write Unsupported extension: "<<string(p)<<endl;
- return false;
- }
- #ifndef IGL_HEADER_ONLY
- // Explicit template specialization
- // generated by autoexplicit.sh
- template bool igl::write<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
- #endif
|