Skip to content
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

Small optimizations and fixes in PCLVisualizer #2112

Merged
merged 5 commits into from
Dec 18, 2017

Conversation

denix56
Copy link
Contributor

@denix56 denix56 commented Dec 3, 2017

Improve performance, fix compilation issues

Finally, I have found time to split my last pull request in several parts.

Improve performance, fix compilation issues
@taketwo
Copy link
Member

taketwo commented Dec 3, 2017

I'm afraid that besides from your refactorings, the commit undoes several of your recently merged pull requests (#2038, #2077).

@taketwo
Copy link
Member

taketwo commented Dec 3, 2017

Thanks. Could you also clarify these guards #if VTK_RENDERING_BACKEND_OPENGL_VERSION < 2 that you added. Why? Was there a bug? Also pointers to VTK documentation, if possible.

@denix56
Copy link
Contributor Author

denix56 commented Dec 3, 2017

I added this guard, because in one of the recent VTK commits (somewhere in September/October) the function was removed (it was not defined in OpenGL2 at all, it had empty body)

Update: it was not removed, but marked as deprecated
Kitware/VTK@67e054c#diff-68b2c0769e63436aa42f417f41e15ef3

size_t i;
for (i = 0; i < point_cloud->points.size (); ++i)
poly_points->InsertPoint (i, point_cloud->points[i].x, point_cloud->points[i].y, point_cloud->points[i].z);
for (size_t i = 0; i < point_cloud->points.size (); ++i) {
Copy link
Member

@taketwo taketwo Dec 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line before bracket

@@ -293,7 +294,7 @@ namespace pcl
/** \brief Disables the Orientatation Marker Widget so it is removed from the renderer */
void
removeOrientationMarkerWidgetAxes ();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we add some trailing spaces here?

@@ -4079,7 +4085,7 @@ pcl::visualization::PCLVisualizer::renderViewTesselatedSphere (

poses.push_back (pose_view);

}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation here seemed correct. Having two } in consecutive lines with no indentation doesn't. What happened exactly?

@@ -3979,7 +3985,7 @@ pcl::visualization::PCLVisualizer::renderViewTesselatedSphere (
triangle->GetPoints ()->GetPoint (1, p1);
triangle->GetPoints ()->GetPoint (2, p2);
visible_area += vtkTriangle::TriangleArea (p0, p1, p2);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also looks like a mistake. The indentation was similar to the opening bracket, before the change.

@SergioRAgostinho
Copy link
Member

This is not exactly a refactoring, but more like a code style cleanup. I'll probably change the commit message to that if it's ok.

@SergioRAgostinho SergioRAgostinho added the needs: author reply Specify why not closed/merged yet label Dec 3, 2017
@taketwo taketwo added needs: code review Specify why not closed/merged yet and removed needs: author reply Specify why not closed/merged yet labels Dec 4, 2017
@SergioRAgostinho
Copy link
Member

Changing the status back to "waiting feedback" because there's still two comments of my review left to be addressed.

@SergioRAgostinho SergioRAgostinho added needs: author reply Specify why not closed/merged yet and removed needs: code review Specify why not closed/merged yet labels Dec 5, 2017
@taketwo taketwo removed the needs: author reply Specify why not closed/merged yet label Dec 18, 2017
@taketwo taketwo merged commit 415315e into PointCloudLibrary:master Dec 18, 2017
taketwo added a commit that referenced this pull request Dec 21, 2017
handle VTK legacy function (follow up to #2112)
@v4hn v4hn mentioned this pull request Jan 23, 2018
@taketwo taketwo changed the title Refactor visualizer Small optimizations and fixes in PCLVisualizer Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants