Jelajahi Sumber

explicit instanciation for readWRL

Former-commit-id: a1b35ba6bbcb24e58892414c925fc6b1b4b40563
Alec Jacobson (jalec 11 tahun lalu
induk
melakukan
831cdd3bb8

+ 0 - 3
examples/quicklook-mesh/src/render_to_buffer.cpp

@@ -33,7 +33,6 @@ extern "C" {
 static int width,height;
 static Eigen::MatrixXd V,N;
 static Eigen::MatrixXi F;
-static double bbd;
 static Eigen::Vector3d Vmean, Vmax,Vmin;
 static bool invert = false;
 static float background_color[4] = {0,0,0,1};
@@ -216,7 +215,6 @@ void push_object(const Viewport & vp)
   Vector3d eff_Vmax  = m*Vmax;
   Vector3d eff_Vmin  = m*Vmin;
   Vector3d eff_Vmean = m*Vmean;
-  //glScaled(2./bbd,2./bbd,2./bbd);
   const double dy = fabs(eff_Vmax(1,0)-eff_Vmin(1,0));
   const double dx = fabs(eff_Vmax(0,0)-eff_Vmin(0,0));
   //const double dz = fabs(eff_Vmax(2,0)-eff_Vmin(2,0));
@@ -412,7 +410,6 @@ bool render_to_buffer(
   Vmax = V.colwise().maxCoeff();
   Vmin = V.colwise().minCoeff();
   Vmean = 0.5*(Vmax + Vmin);
-  bbd = (Vmax - Vmin).maxCoeff();
 
   // Figure out if normals should be flipped (hopefully this is never a
   // bottleneck)

+ 5 - 0
include/igl/readWRL.cpp

@@ -95,3 +95,8 @@ IGL_INLINE bool igl::readWRL(
   fclose(wrl_file);
   return true;
 }
+
+#ifndef IGL_HEADER_ONLY
+// Explicit template instanciation
+template bool igl::readWRL<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> > > >&);
+#endif