-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
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
About the environment of QT #5
Comments
You only need Qt if you would like to run the demo tool. The library itself can be just used by copying header files. To build .pro file you would need qmake which comes with Qt. Or you could open .pro in QtCreator which supports qmake out of the box. Does this answer your question? |
Hi! I copyed header files,and got results,but if I put point8 which inside the Concave polygon,the result is not right,the code is below: #include <iostream>
#include "CDT.h"
#include "VerifyTopology.h"
#include "CDTUtils.h"
using Triangulation = CDT::Triangulation<float>;
typedef float CoordType;
typedef CDT::V2d<CoordType> V2d;
typedef CDT::Edge Edge;
int main() {
std::cout << "Hello, World!" << std::endl;
std::vector<V2d> pts;
std::vector<Edge> edges;
Triangulation cdt =
Triangulation(CDT::FindingClosestPoint::BoostRTree);
//point0
pts.push_back({-1,0});
//point1
pts.push_back({1,0});
//point2
pts.push_back({1,1});
//point3
pts.push_back({0.5,1});
//point4
pts.push_back({0.5,2});
//point5
pts.push_back({-0.5,2});
//point6
pts.push_back({-0.5,1});
//point7
pts.push_back({-1,1});
//point8
pts.push_back({0.75,0.5});
cdt.insertVertices(pts);
edges.push_back(Edge(0, 1));
edges.push_back(Edge(1, 2));
edges.push_back(Edge(2, 3));
edges.push_back(Edge(3, 4));
edges.push_back(Edge(4, 5));
edges.push_back(Edge(5, 6));
edges.push_back(Edge(6, 7));
edges.push_back(Edge(7, 0));
cdt.insertEdges(edges);
cdt.eraseOuterTriangles();
std::cout<<cdt.triangles.size()<<std::endl;
for (int j = 0; j <cdt.triangles.size(); ++j) {
for (int k = 0; k < cdt.triangles[j].vertices.size(); ++k) {
std::cout<<cdt.triangles[j].vertices[k]<<std::endl;
}
}
return 0;
} and I got indexs but If I delete point8 ,the result is fine,so How can I fix this,Thank you very much! |
I'm not quite sure what is the question here.
Triangulation is a 2D problem, for 3D you would need a tetrahedrization library. CDT only does triangulation in 2D |
ok!I will make a mapping from 2d points to 3d points and use it in my work!Thank you! |
Yes, if you just need to get a surface from 3D points, you could discard Z coordinate and use X and Y for triangulation :) |
Yes,surface! |
If you want to make 2.5D surface (single Z for every X and Y) out of point cloud, just ignore Z. But if you would like to have a full 3D surface (folding, multiple Z at X and Y) then CDT can not do that. |
Got it! |
I'm sorry I haven't used QT!Please introduce the installation environment and version of QT,and how to use your code in QT?Thank you!
The text was updated successfully, but these errors were encountered: