We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edge
Hello,
Here is my code:
typedef CDT::V2d<double> Vertex; typedef CDT::Edge Edge; typedef CDT::Triangulation<double> Triangulation; arma::umat Rcpp_delaunay(const arma::mat & points){ Triangulation cdt(CDT::VertexInsertionOrder::AsProvided); size_t npoints = points.n_rows; std::vector<Vertex> vertices(npoints); for (size_t i = 0; i < npoints; ++i) { const arma::rowvec row_i = points.row(i); vertices[i] = Vertex::make(row_i(0), row_i(1)); } cdt.insertVertices(vertices); cdt.eraseSuperTriangle(); const CDT::TriangleVec triangles = cdt.triangles; arma::umat out(triangles.size(), 3); for(size_t i = 0; i < triangles.size(); ++i){ const CDT::VerticesArr3 trgl = triangles[i].vertices; out(i, 0) = trgl[0]; out(i, 1) = trgl[1]; out(i, 2) = trgl[2]; } return out; } arma::umat Rcpp_constrained_delaunay( const arma::mat & points, const arma::umat & edges ){ Triangulation cdt(CDT::VertexInsertionOrder::AsProvided); size_t npoints = points.n_rows; std::vector<Vertex> vertices(npoints); for (size_t i = 0; i < npoints; ++i) { const arma::rowvec row_i = points.row(i); vertices[i] = Vertex::make(row_i(0), row_i(1)); } size_t nedges = edges.n_rows; std::vector<Edge> Edges(nedges); for (size_t i = 0; i < nedges; ++i) { const arma::urowvec row_i = edges.row(i); Edge edge = Edge(row_i(0), row_i(1)); Edges[i] = edge; } cdt.insertVertices(vertices); cdt.insertEdges(Edges); cdt.eraseOuterTrianglesAndHoles(); const CDT::TriangleVec triangles = cdt.triangles; arma::umat out(triangles.size(), 3); for(size_t i = 0; i < triangles.size(); ++i){ const CDT::VerticesArr3 trgl = triangles[i].vertices; out(i, 0) = trgl[0]; out(i, 1) = trgl[1]; out(i, 2) = trgl[2]; } return out; }
The first function works fine. But the compilation of the second function throws this error: no matching function for call to CDT::Edge::Edge().
The text was updated successfully, but these errors were encountered:
That's fine. One gives me an answer on StackOverflow.
Sorry, something went wrong.
No branches or pull requests
Hello,
Here is my code:
The first function works fine. But the compilation of the second function throws this error: no matching function for call to CDT::Edge::Edge().
The text was updated successfully, but these errors were encountered: