Browse Source

fix colors prototyp and comments

Former-commit-id: f8edf4af907199d0221f337cbd875f353d4b693e
Alec Jacobson 11 years ago
parent
commit
71ea73d745
2 changed files with 6 additions and 2 deletions
  1. 1 1
      include/igl/viewer/Viewer.cpp
  2. 5 1
      include/igl/viewer/Viewer.h

+ 1 - 1
include/igl/viewer/Viewer.cpp

@@ -2184,7 +2184,7 @@ namespace igl
     data.dirty |= DIRTY_NORMAL;
   }
 
-  void Viewer::set_colors(Eigen::MatrixXd C)
+  void Viewer::set_colors(const Eigen::MatrixXd &C)
   {
     using namespace std;
     if (C.rows() == 1)

+ 5 - 1
include/igl/viewer/Viewer.h

@@ -348,7 +348,11 @@ namespace igl
     // Helpers that can draw the most common meshes
     void draw_mesh(const Eigen::MatrixXd& V, const Eigen::MatrixXi& F);
     void set_normals(const Eigen::MatrixXd& N);
-    void set_colors(Eigen::MatrixXd C);
+    // Set the color of the mesh 
+    //
+    // Inputs:
+    //   C  #V|#F|1 by 3 list of colors
+    void set_colors(const Eigen::MatrixXd &C);
     void set_UV(const Eigen::MatrixXd& UV);
     void set_UV(const Eigen::MatrixXd& UV_V, const Eigen::MatrixXi& UV_F);
     void set_texture(