Page 1 of 1
Mesh editing CGAL routines in C++
Posted: Mon Mar 03, 2014 10:01 am
by marc_256
For my mesh editor,
I like to use the CGAL (
www.cgal.org) math routines.
Is there someone who have tested the CGAL math routines ?
I never did some stuff, but is is possible to use C++ routines in PB 5.21 ?
Thanks,
Re: Mesh editing CGAL routines in C++
Posted: Wed Mar 05, 2014 2:50 am
by idle
I don't think it'd be doable from the headers I looked at.
There are limitations on what native c++ libs can be used from PB
constructors need to be declared as extern c
and classes have to be exported as pure virtual functions
additionally x86 requires a fasm hack to work via PB Interfaces since thiscall isn't supported
but x64 is ok since it's all fastcall
Re: Mesh editing CGAL routines in C++
Posted: Wed Mar 05, 2014 11:37 am
by marc_256
thanks idle,
maybe I have to port these to PB, via PB coding ...
For me CGAL looks good stuff to use for my Mesh editor.
Like the mesh bool stuff (intersection, difference, add)
Greetings,
Re: Mesh editing CGAL routines in C++
Posted: Thu Mar 06, 2014 12:37 am
by idle
It'd be difficult wrap for PB, you'd need to write a wrapper in C++ to construct objects of the specific types you needed
and either flatten the class exporting each function from the classes
or export a class via a pure virtual class if you only need it for x64
doesn't appear to be many alternatives to the library.
Probably easier to port what you need into PB if you can follow the code
Re: Mesh editing CGAL routines in C++
Posted: Tue Mar 11, 2014 5:58 pm
by IdeasVacuum
I asked GeometryFactory about the CGAL license - surprisingly, no response, which might indicate that it is defunct, or at least they are.