Add and fix test for fast_find_self_intersections (#2382)
* add test case * add coplanarity test * another failing test * use orient3d * no printing * reverting... That introduced lots of other failure cases * subdivided knight case * wip predicates * promising predicates version * tri_tri_overlap compiles, header guards, predicate find_* * tests for predicates::find_in... * parallel for * note * mv to predicates * remove old functions * tutorials; extracting segments is broken 904 * fix extraction bug * missing header * capture consts
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <igl/read_triangle_mesh.h>
|
||||
#include <igl/unique.h>
|
||||
#include <igl/opengl/glfw/Viewer.h>
|
||||
#include <igl/fast_find_self_intersections.h>
|
||||
#include <igl/predicates/find_self_intersections.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -18,12 +18,13 @@ int main(int argc, char *argv[])
|
||||
Eigen::VectorXi EI;
|
||||
Eigen::MatrixXd EV;
|
||||
Eigen::MatrixXi IF,EE;
|
||||
Eigen::Array<bool,Eigen::Dynamic,1> CP;
|
||||
|
||||
if(igl::fast_find_self_intersections(V,F,false,false,IF,EV,EE,EI))
|
||||
if(igl::predicates::find_self_intersections(V,F,IF,CP,EV,EE,EI))
|
||||
{
|
||||
std::cout<<"Found "<<IF.rows()<<" self intersecting pairs"<<std::endl;
|
||||
// plot edge vertices
|
||||
viewer.data().set_edges(EV,EE, Eigen::RowVector3d(1,0,0));
|
||||
viewer.data().set_edges(EV,EE, Eigen::RowVector3d(1,1,1));
|
||||
}
|
||||
Eigen::VectorXi I;
|
||||
igl::unique(IF,I);
|
||||
|
||||
Reference in New Issue
Block a user