tysonbrochu / eltopo Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://www.cs.ubc.ca/labs/imager/tr/2009/eltopo/eltopo.html
License: BSD 2-Clause "Simplified" License
Home Page: http://www.cs.ubc.ca/labs/imager/tr/2009/eltopo/eltopo.html
License: BSD 2-Clause "Simplified" License
I got a simple scene with a cloth (8 triangles) falling down on a cube (12 triangles). El Topo/collisions fail after like 40 frames. The setup is collision free on startup. The vertices of the cube (8 in total) are all pinned.
I am using the "el_topo_integrate()" interface with the following options:
m_collision_safety = 1;
m_proximity_epsilon = 0.001;
m_verbose = 0;
I did see your debuging code in dynamicsurface.cpp and produced the following debug files:
https://dl.dropbox.com/u/55825215/Blender/current.bin
https://dl.dropbox.com/u/55825215/Blender/predicted.bin
Thank you!
I've tried to build this on Windows 7 with VS2015 (VS14.0) but I receive the following errors:
1>------ Build started: Project: eltopo, Configuration: Release x64 ------
1> bfstream.cpp
1>..\common\bfstream.cpp(4): warning C4800: 'int': forcing value to bool 'true' or 'false' (performance warning)
1> collisionqueries.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> cubic_ccd_wrapper.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> fileio.cpp
1> levelset.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> makelevelset2.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> makelevelset3.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> marching_tiles_hires.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> marching_triangles.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> dense_matrix.cpp
1> sparse_matrix.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> root_parity_ccd_wrapper.cpp
1> runstats.cpp
1>..\common\runstats.cpp(56): error C2039: 'min': is not a member of 'std'
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\fstream(13): note: see declaration of 'std'
1>..\common\runstats.cpp(56): error C3861: 'min': identifier not found
1>..\common\runstats.cpp(64): error C2039: 'max': is not a member of 'std'
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\fstream(13): note: see declaration of 'std'
1>..\common\runstats.cpp(64): error C3861: 'max': identifier not found
1>..\common\runstats.cpp(109): error C2039: 'min': is not a member of 'std'
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\fstream(13): note: see declaration of 'std'
1>..\common\runstats.cpp(109): error C3861: 'min': identifier not found
1>..\common\runstats.cpp(117): error C2039: 'max': is not a member of 'std'
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\fstream(13): note: see declaration of 'std'
1>..\common\runstats.cpp(117): error C3861: 'max': identifier not found
1> expansion.cpp
1> interval.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> neg.cpp
1> rootparitycollisiontest.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> accelerationgrid.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> broadphasegrid.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> collisionpipeline.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> Compiling...
1> dynamicsurface.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> edgecollapser.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> edgeflipper.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> edgesplitter.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> eltopo.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1>..\eltopo3d\eltopo.cpp(77): warning C4800: 'const int': forcing value to bool 'true' or 'false' (performance warning)
1>..\eltopo3d\eltopo.cpp(78): warning C4800: 'const int': forcing value to bool 'true' or 'false' (performance warning)
1>..\eltopo3d\eltopo.cpp(79): warning C4800: 'const int': forcing value to bool 'true' or 'false' (performance warning)
1>..\eltopo3d\eltopo.cpp(244): warning C4800: 'const int': forcing value to bool 'true' or 'false' (performance warning)
1> impactzonesolver.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1>..\eltopo3d\impactzonesolver.cpp(348): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(350): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(368): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(379): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(412): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(419): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(424): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(425): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1>..\eltopo3d\impactzonesolver.cpp(426): warning C4267: 'argument': conversion from 'size_t' to 'unsigned long', possible loss of data
1> meshmerger.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> meshpincher.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1>..\eltopo3d\meshpincher.cpp(150): warning C4244: 'argument': conversion from 'unsigned __int64' to 'double', possible loss of data
1> meshrenderer.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> meshsmoother.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> nondestructivetrimesh.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> subdivisionscheme.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> surftrack.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
1> trianglequality.cpp
1>C:\dev\eltopo\common\util.h(200): error C2556: 'int lround(double)': overloaded function differs only by return type from 'long lround(double)'
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(199): error C2371: 'lround': redefinition; different basic types
1> C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\math.h(509): note: see declaration of 'lround'
1>C:\dev\eltopo\common\util.h(200): error C2491: 'lround': definition of dllimport function not allowed
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Thanks in advance
Hello,
I get the following error when trying to compile for mac os (high sierra 10.13.6).
g++ -o talpa_release obj/iomesh.o obj/lexer.o obj/newparser.o obj/geometryinit.o obj/scriptinit.o obj/noise.o obj/meancurvature.o obj/faceoff.o obj/normaldriver.o obj/sisccurlnoisedriver.o obj/bfstream.o obj/makelevelset3.o obj/marching_tiles_hires.o obj/runstats.o obj/main.o libeltopo_release.a -framework OpenGL -framework GLUT -framework vecLib libeltopo_release.a
ld: cannot link directly with /System/Library/Frameworks//vecLib.framework/vecLib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any advice?
thanks in advance!
There are multiple buffer overflows in the blender's external library eltopo in ObjLoader.cpp file. I have attached a report from flawfinder. I didn't check them all but there are several of them that are pretty obvious, for instance in line 349:
char* dir;
char* filename;
char buf[128]; ----> line 330
GLuint nummaterials, i;
dir = glmDirName(model->pathname);
filename = (char*)malloc(sizeof(char) * (strlen(dir) + strlen(name) + 1));
strcpy(filename, dir);
strcat(filename, name);
free(dir);
file = fopen(filename, "r");
if (!file) {
fprintf(stderr, "glmReadMTL() failed: can't open material file "%s".\n",
filename);
exit(1);
}
free(filename);
/* count the number of materials in the file /
nummaterials = 1;
while(fscanf(file, "%s", buf) != EOF) { ------> line 349
switch(buf[0]) {
case '#': / comment /
/ eat up rest of line /
fgets(buf, sizeof(buf), file);
break;
case 'n': / newmtl */
fgets(buf, sizeof(buf), file);
nummaterials++;
sscanf(buf, "%s %s", buf, buf);
break;
If a very long string is read from a OBJ file it can overwrite buf in line 330, which could lead even to arbitrary code execution with a specially crafted OBJ file.
Hello,
I am learning a way to use libeltopo.a library in C program, but so far examples directories are huge and too much interconnected. A minimal example which I would like to achieve is to make Enright test, for octahedron with Euler time integration and in between that all fancy stuff which are present in figures 4.4, 4.5 from [Brochu and Bridson 2009].
How can I write it or on which source files should I look to extract minimal working example?
The compile-time check for Windows should probably be changed from #ifdef WIN32 (which I'd have to explicitly define) to either _WIN32 or _MSC_VER, both of which are auto-defined by VC++.
ssize_t is not defined on Windows (nor is it standard, from what I understand). I switched'em to size_t's, we'll see if that breaks everything.
_Ios_Fmtflags is not defined on Windows. I had to change the one line that used it to:
std::ios_base::fmtflags originalFlags = std::cout.flags();
with an ifdef for Windows. Though I suspect that form is platform-independent, since I didn't have to change anything else.
random() is not platform independent, so probably better to use rand() from stdlib.
Also, should iomesh.h live in the eltopo3d folder instead of talpa? dynamicsurface requires it.
Not sure if this happens in the current version.
Reported by a user:
From what I can see, it doesn't look like the verbosity flag passed in from the C API actually gets used inside ElTopo. el_topo_integrate doesn't pass it on to DynamicSurface, and SurfTrackInitializationParameters has no verbose flag, so when el_topo_static_operations creates the SurfTrack, the resulting internal DynamicSurface doesn't get verbosity turned on either.
Reported by a user:
I'm using the cubic CCD stuff from El Topo, and we're getting some weird results, and I wonder if you could help us out.
The problem I'm having is that the point_triangle_call from ccd_wrapper.h seems to always returning 0, 0, 1 for the barycentric coordinates of the collision. As far as I can tell, the collision time is correct.
Here's a snippet of code that shows what I mean:
Vec3d tri_start[3], tri_end[3];
tri_start[0] = Vec3d(-1, -1, -1);
tri_start[1] = Vec3d( 1, -1, -1);
tri_start[2] = Vec3d( 0, 1, -1);
tri_end[0] = Vec3d(-1, -1, 1);
tri_end[1] = Vec3d( 1, -1, 1);
tri_end[2] = Vec3d( 0, 1, 1);
Vec3d p_start(0, 0, -10);
Vec3d p_end(0, 0, 10);
size_t dummy_index0 = 0, dummy_index1 = 1, dummy_index2 = 2, dummy_index3 = 3;
double bary1, bary2, bary3, t, relative_displacement;
Vec3d normal;
bool collided = point_triangle_collision(p_start, p_end, dummy_index0,
tri_start[0], tri_end[0], dummy_index1,
tri_start[1], tri_end[1], dummy_index2,
tri_start[2], tri_end[2], dummy_index3,
bary1, bary2, bary3,
normal,
t,
relative_displacement);
For this example, it seems to me that the barycentric coordintates of the collision should be (.25, .25, .5), but it is currently returning (0,0,1). The normal is correct ([0, 0, 1]), and the time is .5, which seems correct. Am I doing something wrong?
**You'll note I changed the signature of point_triangle_collision to return the time that is returned in the call to tunicate_point_triangle_collision.
Hello,
I'm a Gentoo Linux developer, and I'm one of the maintainers for Blender. While updating it today, I noted that eltopo is actually bundled in it. I went looking for the original library so that I could package it separately, and since I found that the build system wouldn't be too flexible for distributions, I ended up writing an autotools-based one, that most distributions would be happy to use...
Unfortunately, now I notice that there is no license assigned to any file in this package, which means for us that we have to treat it as an "all rights reserved" proprietary package. Is this intentional, or just an oversight?
Please note that if you want to just have the most open license possible, you still have to declare copyright and a license — I'd strongly suggest going with either the WTFPL or the X11/MIT license (I'm linking to FSF only because they have a note about their actual free/non-free status that most distributions follow ... I'm in no way suggesting you ought to copyleft this as they are, although if you feel that's a good decision, go for it).
Just please handle licensing one way or the other, I'll be glad to contribute back my changes, and the buildsystem, then so that your software can be made available to Gentoo Linux's users, and we'll build Blender against that.
Thanks,
Diego
In file included from main.cpp:44:0:
../common/array2.h:28:4: error: ‘ptrdiff_t’ does not name a type
ptrdiff_t ni, nj;
^~~~~~~~~
Hello! I find there are meshmerge operation in the library, and I want to know if it can be used to merge two meshes with a few overlap region into a single mesh? Thanks very much.
Inside of the face offsetting code, null space smoothing is called to get a tangential offset, but then that seems to be completely overwritten by the normal offset computing using the entropy solution. That should either be fixed, or the null space smoothing pass stripped out of it.
There are two minor changes that will allow building eltopo with gcc >=4.6. Do you want a patch or should I do the pull request thing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.