|
@@ -1,22 +1,22 @@
|
|
|
// This file is part of libigl, a simple c++ geometry processing library.
|
|
|
-//
|
|
|
+//
|
|
|
// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
|
|
|
-//
|
|
|
-// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
|
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
|
+//
|
|
|
+// This Source Code Form is subject to the terms of the Mozilla Public License
|
|
|
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
|
|
// obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
-#include "read.h"
|
|
|
+#include "read_triangle_mesh.h"
|
|
|
|
|
|
-#include "readOBJ.h"
|
|
|
-#include "readOFF.h"
|
|
|
-#include "pathinfo.h"
|
|
|
+#include <igl/readOBJ.h>
|
|
|
+#include <igl/readOFF.h>
|
|
|
+#include <igl/pathinfo.h>
|
|
|
|
|
|
#include <cstdio>
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
template <typename Scalar, typename Index>
|
|
|
-IGL_INLINE bool igl::read(
|
|
|
+IGL_INLINE bool igl::read_triangle_mesh(
|
|
|
const std::string str,
|
|
|
std::vector<std::vector<Scalar> > & V,
|
|
|
std::vector<std::vector<Index> > & F)
|
|
@@ -45,7 +45,7 @@ IGL_INLINE bool igl::read(
|
|
|
|
|
|
#ifndef IGL_NO_EIGN
|
|
|
template <typename DerivedV, typename DerivedF>
|
|
|
-IGL_INLINE bool igl::read(
|
|
|
+IGL_INLINE bool igl::read_triangle_mesh(
|
|
|
const std::string str,
|
|
|
Eigen::PlainObjectBase<DerivedV>& V,
|
|
|
Eigen::PlainObjectBase<DerivedF>& F)
|
|
@@ -55,7 +55,7 @@ IGL_INLINE bool igl::read(
|
|
|
;
|
|
|
while (*p != '.')
|
|
|
p--;
|
|
|
-
|
|
|
+
|
|
|
if (!strcmp(p, ".obj") || !strcmp(p, ".OBJ"))
|
|
|
{
|
|
|
return igl::readOBJ(str,V,F);
|
|
@@ -63,9 +63,9 @@ IGL_INLINE bool igl::read(
|
|
|
{
|
|
|
return igl::readOFF(str,V,F);
|
|
|
}
|
|
|
- else
|
|
|
+ else
|
|
|
{
|
|
|
- fprintf(stderr,"read() does not recognize extension: %s\n",p);
|
|
|
+ fprintf(stderr,"read_triangle_mesh() does not recognize extension: %s\n",p);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -74,7 +74,7 @@ IGL_INLINE bool igl::read(
|
|
|
#ifndef IGL_HEADER_ONLY
|
|
|
// Explicit template specialization
|
|
|
// generated by autoexplicit.sh
|
|
|
-template bool igl::read<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> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
|
|
|
-template bool igl::read<double, int>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&);
|
|
|
-template bool igl::read<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(std::string, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
|
|
|
+template bool igl::read_triangle_mesh<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> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
|
|
|
+template bool igl::read_triangle_mesh<double, int>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&);
|
|
|
+template bool igl::read_triangle_mesh<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(std::string, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
|
|
|
#endif
|