浏览代码

hg cleanup'

Former-commit-id: e9ab99534f0f37603257492a71f39ce44e91e335
Alec Jacobson (jalec 11 年之前
父节点
当前提交
83135b0027
共有 4 个文件被更改,包括 26 次插入2 次删除
  1. 7 0
      .hgignore
  2. 10 0
      examples/transparency/project.m
  3. 1 0
      include/igl/cumsum.cpp
  4. 8 2
      include/igl/embree/EmbreeIntersector.h

+ 7 - 0
.hgignore

@@ -42,3 +42,10 @@ Release/
 documentation/*.aux
 documentation/*.out
 documentation/*.log
+doc.html
+examples/bbw/bbw_demo
+external/medit/rebar.rbr
+examples/bbw/examples/*-volume.dmat
+examples/bbw/examples/*-volume.mesh
+examples/upright/upright
+examples/principal_curvature/curvature

+ 10 - 0
examples/transparency/project.m

@@ -0,0 +1,10 @@
+function W = project(V,MV,P,VP)
+  V = V * MV' * P';
+  % WTF! Perspective division is not in the documentation for gluProject: 
+  % http://www.opengl.org/sdk/docs/man2/xhtml/gluProject.xml
+  V = bsxfun(@rdivide,V,V(:,4));
+  W = [ ...
+    VP(1) + (VP(3) * (V(:,1)+1))/2, ...
+    VP(2) + (VP(4) * (V(:,2)+1))/2, ...
+    (V(:,3)+1)/2];
+end

+ 1 - 0
include/igl/cumsum.cpp

@@ -61,4 +61,5 @@ IGL_INLINE void igl::cumsum(
 // Explicit template specialization
 template void igl::cumsum<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::cumsum<Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
+template void igl::cumsum<Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&, int, Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> >&);
 #endif

+ 8 - 2
include/igl/embree/EmbreeIntersector.h

@@ -41,7 +41,7 @@ namespace igl
   private:
     // Copying and assignment are not allowed.
     inline EmbreeIntersector(const EmbreeIntersector & that);
-    inline EmbreeIntersector operator=(const EmbreeIntersector &);
+    inline EmbreeIntersector & operator=(const EmbreeIntersector &);
   public:
     virtual inline ~EmbreeIntersector();
       
@@ -163,11 +163,17 @@ inline igl::EmbreeIntersector::EmbreeIntersector()
 
 inline igl::EmbreeIntersector::EmbreeIntersector(
   const EmbreeIntersector & /*that*/)
+  :// To make -Weffc++ happy
+  mesh(NULL),
+  triangles(NULL),
+  vertices(NULL),
+  intersector(NULL),
+  initialized(false)
 {
   assert(false && "Copying EmbreeIntersector is not allowed");
 }
 
-inline igl::EmbreeIntersector igl::EmbreeIntersector::operator=(
+inline igl::EmbreeIntersector & igl::EmbreeIntersector::operator=(
   const EmbreeIntersector & /*that*/)
 {
   assert(false && "Assigning an EmbreeIntersector is not allowed");