Browse Source

found missing style sheet

Former-commit-id: d8879959a1d900071df363aa61e6f7a1a49d453f
Alec Jacobson (jalec 12 years ago
parent
commit
2032eaf5a1
4 changed files with 163 additions and 20 deletions
  1. 27 10
      include/igl/per_corner_normals.cpp
  2. 18 10
      include/igl/per_corner_normals.h
  3. 1 0
      include/igl/per_vertex_normals.cpp
  4. 117 0
      style.css

+ 27 - 10
include/igl/per_corner_normals.cpp

@@ -6,10 +6,10 @@
 
 template <typename DerivedV, typename DerivedF>
 IGL_INLINE void igl::per_corner_normals(
-                                   const Eigen::PlainObjectBase<DerivedV>& V,
-                                   const Eigen::PlainObjectBase<DerivedF>& F,
-                                   const double corner_threshold,
-                                   Eigen::PlainObjectBase<DerivedV> & CN)
+  const Eigen::PlainObjectBase<DerivedV>& V,
+  const Eigen::PlainObjectBase<DerivedF>& F,
+  const double corner_threshold,
+  Eigen::PlainObjectBase<DerivedV> & CN)
 {
   using namespace igl;
   using namespace Eigen;
@@ -21,14 +21,30 @@ IGL_INLINE void igl::per_corner_normals(
   return per_corner_normals(V,F,FN,VF,corner_threshold,CN);
 }
 
+template <typename DerivedV, typename DerivedF, typename DerivedFN, typename DerivedCN>
+IGL_INLINE void igl::per_corner_normals(
+  const Eigen::PlainObjectBase<DerivedV>& V,
+  const Eigen::PlainObjectBase<DerivedF>& F,
+  const Eigen::PlainObjectBase<DerivedFN>& FN,
+  const double corner_threshold,
+  Eigen::PlainObjectBase<DerivedCN> & CN)
+{
+  using namespace igl;
+  using namespace Eigen;
+  using namespace std;
+  vector<vector<int> > VF,VFi;
+  vf(V,F,VF,VFi);
+  return per_corner_normals(V,F,FN,VF,corner_threshold,CN);
+}
+
 template <typename DerivedV, typename DerivedF, typename IndexType>
 IGL_INLINE void igl::per_corner_normals(
-                                   const Eigen::PlainObjectBase<DerivedV>& /*V*/,
-                                   const Eigen::PlainObjectBase<DerivedF>& F,
-                                   const Eigen::PlainObjectBase<DerivedV>& FN,
-                                   const std::vector<std::vector<IndexType> >& VF,
-                                   const double corner_threshold,
-                                   Eigen::PlainObjectBase<DerivedV> & CN)
+  const Eigen::PlainObjectBase<DerivedV>& /*V*/,
+  const Eigen::PlainObjectBase<DerivedF>& F,
+  const Eigen::PlainObjectBase<DerivedV>& FN,
+  const std::vector<std::vector<IndexType> >& VF,
+  const double corner_threshold,
+  Eigen::PlainObjectBase<DerivedV> & CN)
 {
   using namespace igl;
   using namespace Eigen;
@@ -77,4 +93,5 @@ IGL_INLINE void igl::per_corner_normals(
 // generated by autoexplicit.sh
 template void igl::per_corner_normals<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, double, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::per_corner_normals<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, unsigned int>(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, std::vector<std::vector<unsigned int, std::allocator<unsigned int> >, std::allocator<std::vector<unsigned int, std::allocator<unsigned int> > > > const&, double, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> >&);
+template void igl::per_corner_normals<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, 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&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, double, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 #endif

+ 18 - 10
include/igl/per_corner_normals.h

@@ -16,21 +16,29 @@ namespace igl
   //     for corner F(i,j) is at CN(i*3+j,:) 
   template <typename DerivedV, typename DerivedF>
   IGL_INLINE void per_corner_normals(
-                                     const Eigen::PlainObjectBase<DerivedV>& V,
-                                     const Eigen::PlainObjectBase<DerivedF>& F,
-                                     const double corner_threshold,
-                                     Eigen::PlainObjectBase<DerivedV> & CN);
+    const Eigen::PlainObjectBase<DerivedV>& V,
+    const Eigen::PlainObjectBase<DerivedF>& F,
+    const double corner_threshold,
+    Eigen::PlainObjectBase<DerivedV> & CN);
   // Other Inputs:
   //   FN  #F by 3 eigen Matrix of face normals
+  template <typename DerivedV, typename DerivedF, typename DerivedFN, typename DerivedCN>
+  IGL_INLINE void per_corner_normals(
+    const Eigen::PlainObjectBase<DerivedV>& V,
+    const Eigen::PlainObjectBase<DerivedF>& F,
+    const Eigen::PlainObjectBase<DerivedFN>& FN,
+    const double corner_threshold,
+    Eigen::PlainObjectBase<DerivedCN> & CN);
+  // Other Inputs:
   //   VF  map from vertices to list of incident faces
   template <typename DerivedV, typename DerivedF, typename IndexType>
   IGL_INLINE void per_corner_normals(
-                                     const Eigen::PlainObjectBase<DerivedV>& V,
-                                     const Eigen::PlainObjectBase<DerivedF>& F,
-                                     const Eigen::PlainObjectBase<DerivedV>& FN,
-                                     const std::vector<std::vector<IndexType> >& VF,
-                                     const double corner_threshold,
-                                     Eigen::PlainObjectBase<DerivedV> & CN);
+    const Eigen::PlainObjectBase<DerivedV>& V,
+    const Eigen::PlainObjectBase<DerivedF>& F,
+    const Eigen::PlainObjectBase<DerivedV>& FN,
+    const std::vector<std::vector<IndexType> >& VF,
+    const double corner_threshold,
+    Eigen::PlainObjectBase<DerivedV> & CN);
 }
 
 #ifdef IGL_HEADER_ONLY

+ 1 - 0
include/igl/per_vertex_normals.cpp

@@ -55,4 +55,5 @@ IGL_INLINE void igl::per_vertex_normals(
 // generated by autoexplicit.sh
 template void igl::per_vertex_normals<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::per_vertex_normals<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> >&);
+template void igl::per_vertex_normals<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 #endif

+ 117 - 0
style.css

@@ -0,0 +1,117 @@
+table
+{
+  border-spacing: 0px;
+}
+tr.header th
+{
+  border-bottom: 1px solid; 
+  background-color: #ffb;
+  padding-left: 10px;
+  padding-right: 20px;
+}
+tr.d0 td 
+{
+  background-color: #EEE; 
+  color: black;
+  padding-left: 10px;
+  padding-right: 20px;
+  min-width: 200px;
+}
+tr.d1 td
+{
+  background-color: #bcf; 
+  color: black;
+  padding-left: 10px;
+  padding-right: 20px;
+  min-width: 200px;
+}
+
+tr.gotcha1 td
+{
+  background-color: #fcb;
+  color: black;
+  padding-left: 10px;
+  padding-right: 20px;
+  min-width: 200px;
+}
+
+tr.gotcha2 td
+{
+  background-color: #fed;
+  color: black;
+  padding-left: 10px;
+  padding-right: 20px;
+  min-width: 200px;
+}
+/* Don't color pre tag like a box when it shows up in table */
+tr pre
+{
+  background-color: inherit;
+  overflow: auto;
+  padding: none;
+  border: none;
+}
+
+.note:before
+{
+  font-style: normal;
+  content: "Note: ";
+}
+.note
+{
+  background-color: #ddd;
+  border: 1px solid #bbb;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  font-style: italic;
+  padding-left: 4px;
+  padding-right: 4px;
+  padding-top: 2px;
+  padding-bottom: 2px;
+}
+span.highlight
+{
+  background-color: #4F5;
+}
+a 
+{
+  text-decoration:none;
+  border:none;
+  outline:none;
+  color:#0645AD;
+}
+a:hover 
+{
+  color:#0645AD;
+  text-decoration: underline;
+}
+a:visited
+{
+  color:#0b0080;
+}
+span.todo:before
+{
+  font-style: normal;
+  content: "TODO: ";
+}
+span.todo
+{
+  color: #F54;
+  font-style: italic;
+}
+pre
+{
+  background-color: #c3e0f0;
+  overflow: auto;
+  padding-left: 8px;
+  padding-right: 8px;
+  padding-top: 4px;
+  padding-bottom: 4px;
+  border: 1px solid #999;
+}
+img.center
+{
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}