-
-
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
Replace '.points[' with just '[' #4219
Replace '.points[' with just '[' #4219
Conversation
cloud_out[i].x = static_cast<float>(p[0]); | ||
cloud_out[i].y = static_cast<float>(p[1]); | ||
cloud_out[i].z = static_cast<float>(p[2]); |
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.
for-range
cloud[i].x = 1024 * rand () / (RAND_MAX + 1.0f); | ||
cloud[i].y = 1024 * rand () / (RAND_MAX + 1.0f); | ||
cloud[i].z = 1024 * rand () / (RAND_MAX + 1.0f); |
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.
for-range
} | ||
|
||
pcl::io::savePCDFileASCII ("test_pcd.pcd", cloud); | ||
std::cerr << "Saved " << cloud.points.size () << " data points to test_pcd.pcd." << std::endl; | ||
|
||
for (std::size_t i = 0; i < cloud.points.size (); ++i) | ||
std::cerr << " " << cloud.points[i].x << " " << cloud.points[i].y << " " << cloud.points[i].z << std::endl; | ||
std::cerr << " " << cloud[i].x << " " << cloud[i].y << " " << cloud[i].z << std::endl; | ||
|
||
return (0); | ||
} |
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.
new line
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.
No. clang-format remember
@@ -102,7 +102,7 @@ main (int, char** argv) | |||
std::cout<<" with size "<<rift_output.points.size()<<std::endl; | |||
|
|||
// Display and retrieve the rift descriptor vector for the first point | |||
pcl::Histogram<32> first_descriptor = rift_output.points[0]; | |||
pcl::Histogram<32> first_descriptor = rift_output[0]; |
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.
no need to create a copy.
I'd recommend a separate PR for these 4 points. |
Adding changes requested in #4219
* Reuse code, add exception in cuda
No description provided.