I need to use delaunay triangulation from Thor. I downloaded v2.0 SDK and built with CMake. Everytime I run example code (
https://github.com/Bromeon/Thor/blob/master/examples/Triangulation.cpp) occurs segmentation fault:
Program received signal SIGSEGV, Segmentation fault.
thor::detail::AdvancedVertex::getPosition (this=<optimized out>) at Triangulation.cpp:141
141 return mPosition;
call stack:
#0 thor::detail::AdvancedVertex::getPosition (this=<optimized out>) at Triangulation.cpp:141
#1 thor::detail::setBoundaryPositions (allVertices=<error reading variable: Cannot access memory at address 0x43ae0048>,
boundaryTriangle=...) at Triangulation.cpp:780
#2 0x0000000100005e0b in thor::detail::triangulateImpl<__gnu_cxx::__normal_iterator<sf::Vector2<float>*, std::vector<sf::Vector2<float>, std::allocator<sf::Vector2<float> > > >, std::back_insert_iterator<std::vector<thor::Triangle<sf::Vector2<float> >, std::allocator<thor::Triangle<sf::Vector2<float> > > > >, thor::detail::ConstrainedTrDetails<__gnu_cxx::__normal_iterator<thor::Edge<sf::Vector2<float> >*, std::vector<thor::Edge<sf::Vector2<float> >, std::allocator<thor::Edge<sf::Vector2<float> > > > > > > (verticesBegin=
{x = 348, y = 180}, verticesEnd={x = 2.11876659e+11, y = 211109360}, trianglesOut=..., details=...)
at /usr/local/include/Thor/Math/Detail/Triangulation.inl:415
#3 0x0000000100005b01 in thor::triangulateConstrained<__gnu_cxx::__normal_iterator<sf::Vector2<float>*, std::vector<sf::Vector2<float>, std::allocator<sf::Vector2<float> > > >, __gnu_cxx::__normal_iterator<thor::Edge<sf::Vector2<float> >*, std::vector<thor::Edge<sf::Vector2<float> >, std::allocator<thor::Edge<sf::Vector2<float> > > > >, std::back_insert_iterator<std::vector<thor::Triangle<sf::Vector2<float> >, std::allocator<thor::Triangle<sf::Vector2<float> > > > > > (verticesBegin={x = 348, y = 180}, verticesEnd=
{x = 2.11876659e+11, y = 211109360}, constrainedEdgesBegin=non-dereferenceable iterator for std::vector,
constrainedEdgesEnd=non-dereferenceable iterator for std::vector, trianglesOut=...)
at /usr/local/include/Thor/Math/Detail/Triangulation.inl:448
#4 0x0000000100003c5f in thor::triangulate<__gnu_cxx::__normal_iterator<sf::Vector2<float>*, std::vector<sf::Vector2<float>, std::allocator<sf::Vector2<float> > > >, std::back_insert_iterator<std::vector<thor::Triangle<sf::Vector2<float> >, std::allocator<thor::Triangle<sf::Vector2<float> > > > > > (verticesBegin={x = 348, y = 180}, verticesEnd={x = 2.11876659e+11, y = 211109360},
trianglesOut=...) at /usr/local/include/Thor/Math/Detail/Triangulation.inl:441
#5 0x0000000100002fa5 in handleEvents (window=..., vertices=std::vector of length 1, capacity 1 = {...},
triangles=std::vector of length 0, capacity 0) at main.cpp:143
#6 0x00000001000027bd in main () at main.cpp:42
It seems like calling createBoundaryPoints function never happen.
I don't know what to do about that error so I'm asking here.
I use Arch Linux, Clang++-5.0, SFML 2.4.2 (dynamic linking).