-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
mesh_sampling tool: Add support for colors #2257
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides from inline comments, LGTM.
tools/mesh_sampling.cpp
Outdated
@@ -81,7 +79,18 @@ randomPointTriangle (float a1, float a2, float a3, float b1, float b2, float b3, | |||
} | |||
|
|||
inline void | |||
randPSurface (vtkPolyData * polydata, std::vector<double> * cumulativeAreas, double totalArea, Eigen::Vector4f& p, bool calcNormal, Eigen::Vector3f& n) | |||
randomPointTriangle (float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this overload? (see next comment)
tools/mesh_sampling.cpp
Outdated
@@ -135,7 +169,8 @@ uniform_sampling (vtkSmartPointer<vtkPolyData> polydata, size_t n_samples, bool | |||
{ | |||
Eigen::Vector4f p; | |||
Eigen::Vector3f n; | |||
randPSurface (polydata, &cumulativeAreas, totalArea, p, calc_normal, n); | |||
Eigen::Vector3i c; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can as well be Eigen::Vector4f c
, which can be passed directly to the existing version of randomPointTriangle()
.
@taketwo : I've updated the PR according to your comments. |
Thanks! |
No description provided.