Browse Source

medit

Former-commit-id: 490eee58d4ef7ef7040de42a1a1a99a9eb3a71a4
Alec Jacobson 11 years ago
parent
commit
c2646d97f6
4 changed files with 19 additions and 9 deletions
  1. 7 0
      README.md
  2. 8 2
      include/igl/ReAntTweakBar.cpp
  3. 2 7
      include/igl/ReAntTweakBar.h
  4. 2 0
      scripts/compile_external.sh

+ 7 - 0
README.md

@@ -116,6 +116,13 @@ To build the tetgen library and executable on Mac OS X issue:
     rm tetgen
     make -f Makefile.igl tetgen
 
+##### Installing medit #####
+To build the igl version of the medit executable on Mac OS X issue:
+
+    cd external/medit
+    make -C libmesh 
+    make -f Makefile.igl medit
+
 ##### Installing Embree 2.0 #####
 To build the embree library and executables on Mac OS X issue:
 

+ 8 - 2
include/igl/ReAntTweakBar.cpp

@@ -125,7 +125,9 @@ namespace
 }
 
 IGL_INLINE igl::ReTwBar::ReTwBar():
- bar(NULL),name(),rw_items(),cb_items()
+ bar(NULL),
+  name(),
+  rw_items(),cb_items()
 {
 }
 
@@ -153,8 +155,12 @@ IGL_INLINE igl::ReTwBar & igl::ReTwBar::operator=(const igl::ReTwBar & that)
 // BAR WRAPPERS
 IGL_INLINE void igl::ReTwBar::TwNewBar(const char * _name)
 {
-  this->name = _name;
   this->bar = ::TwNewBar(_name);
+  // Alec: This causes trouble (not sure why) in multiple applications
+  // (medit, puppet) Probably there is some sort of memory corrpution.
+  // this->name = _name;
+  // Suspiciously this also fails:
+  //this->name = "foobar";
 }
 
 IGL_INLINE int igl::ReTwBar::TwAddVarRW(

+ 2 - 7
include/igl/ReAntTweakBar.h

@@ -39,11 +39,7 @@
 
 // This allows the user to have a non-global, static installation of
 // AntTweakBar
-#ifdef STATIC_ANTTWEAKBAR
-#  include "AntTweakBar.h"
-#else
-#  include <AntTweakBar.h>
-#endif
+#include <AntTweakBar.h>
 // Instead of including AntTweakBar.h, just define the necessary types
 // Types used:
 //   - TwType
@@ -166,7 +162,6 @@ namespace igl
     // anytime AntTweakBar functions can be called directly on the bar
     public:
       TwBar * bar;
-      // Alec: This causes trouble (not sure why)
       std::string name;
     protected:
       std::vector<ReTwRWItem> rw_items;
@@ -182,7 +177,7 @@ namespace igl
   
     // WRAPPERS FOR ANTTWEAKBAR FUNCTIONS 
     public:
-      void TwNewBar(const char *barName);
+      IGL_INLINE void TwNewBar(const char *_name);
       IGL_INLINE int TwAddVarRW(
         const char *name, 
         TwType type, 

+ 2 - 0
scripts/compile_external.sh

@@ -3,6 +3,8 @@ git clone git@github.com:libigl/libigl.git
 cd libigl/
 make -C external/AntTweakBar/src -f Makefile.osx.igl
 make -C external/yimg
+make -C external/medit/libmesh
+make -C external/medit/ -f Makefile.igl medit
 cd external/tetgen
 make clean
 mkdir obj