Browse Source

Merge branch 'master' of github.com:libigl/libigl

Former-commit-id: 55997d2415bb2e119459186719d92be845121b3f
Alec Jacobson 11 years ago
parent
commit
e3bdef474d
4 changed files with 44 additions and 14 deletions
  1. 11 5
      README.md
  2. 8 2
      include/igl/ReAntTweakBar.cpp
  3. 2 7
      include/igl/ReAntTweakBar.h
  4. 23 0
      scripts/compile_external.sh

+ 11 - 5
README.md

@@ -115,6 +115,13 @@ To build the tetgen library and executable on Mac OS X issue:
     rm -f obj/*.o
     rm -f obj/*.o
     make -f Makefile.igl tetlib
     make -f Makefile.igl tetlib
 
 
+##### 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 #####
 ##### Installing Embree 2.0 #####
 To build the embree library and executables on Mac OS X issue:
 To build the embree library and executables on Mac OS X issue:
 
 
@@ -183,12 +190,11 @@ style_guidelines.html
 See `LICENSE.txt`
 See `LICENSE.txt`
 
 
 ## Zipping ##
 ## Zipping ##
-Zip this directory without .hg litter using:
+Zip this directory without .git litter and binaries using:
 
 
-    make clean
-    zip -9 -r --exclude=@exclude.lst  libigl.zip ../libigl
+    git archive —prefix=libigl/ -o libigl.zip master
 
 
 ## Contact ##
 ## Contact ##
 libigl is a group endeavor led by Alec Jacobson and Daniele Panozzo. Please
 libigl is a group endeavor led by Alec Jacobson and Daniele Panozzo. Please
-contact [alecjacobson@gmail.com](mailto:alecjacobson@gmail.com) if you have questions or comments. We are happy
-to get feedback! Enjoy!
+contact [alecjacobson@gmail.com](mailto:alecjacobson@gmail.com) if you have
+questions or comments. We are happy to get feedback! Enjoy!

+ 8 - 2
include/igl/ReAntTweakBar.cpp

@@ -125,7 +125,9 @@ namespace
 }
 }
 
 
 IGL_INLINE igl::ReTwBar::ReTwBar():
 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
 // BAR WRAPPERS
 IGL_INLINE void igl::ReTwBar::TwNewBar(const char * _name)
 IGL_INLINE void igl::ReTwBar::TwNewBar(const char * _name)
 {
 {
-  this->name = _name;
   this->bar = ::TwNewBar(_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(
 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
 // This allows the user to have a non-global, static installation of
 // AntTweakBar
 // 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
 // Instead of including AntTweakBar.h, just define the necessary types
 // Types used:
 // Types used:
 //   - TwType
 //   - TwType
@@ -166,7 +162,6 @@ namespace igl
     // anytime AntTweakBar functions can be called directly on the bar
     // anytime AntTweakBar functions can be called directly on the bar
     public:
     public:
       TwBar * bar;
       TwBar * bar;
-      // Alec: This causes trouble (not sure why)
       std::string name;
       std::string name;
     protected:
     protected:
       std::vector<ReTwRWItem> rw_items;
       std::vector<ReTwRWItem> rw_items;
@@ -182,7 +177,7 @@ namespace igl
   
   
     // WRAPPERS FOR ANTTWEAKBAR FUNCTIONS 
     // WRAPPERS FOR ANTTWEAKBAR FUNCTIONS 
     public:
     public:
-      void TwNewBar(const char *barName);
+      IGL_INLINE void TwNewBar(const char *_name);
       IGL_INLINE int TwAddVarRW(
       IGL_INLINE int TwAddVarRW(
         const char *name, 
         const char *name, 
         TwType type, 
         TwType type, 

+ 23 - 0
scripts/compile_external.sh

@@ -0,0 +1,23 @@
+#!/bin/bash
+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
+make -f Makefile.igl tetgen
+rm -f obj/*.o
+make -f Makefile.igl tetlib
+mkdir -p ../embree/build
+cd ../embree/build
+cmake .. -DCMAKE_C_COMPILER=/opt/local/bin/gcc -DCMAKE_CXX_COMPILER=/opt/local/bin/g++
+make
+cd ../../tinyxml2
+cmake .
+make
+cd ../../
+make -j12
+make -j12