I want to draw a bounding box, then I found the code of drawTBoundingBox class(pcl::people::PersonCluster), and the tutorial Moment of inertia and eccentricity based descriptors, they both use addCube(), the reslut is like below:
But when I run the code, the cube is solid, so I can't see point cloud anymore... as the image below:
What I want is the bounding box like the tutorial, but I don't know how to do to solve this problem.
I really appreciate any help.
maybe the code is outdated and/or some pre-/post-setup code is elsewhere?
Looking at the PCL sources in
there is "actor->GetProperty ()->SetRepresentationToWireframe ();", have
you checked that it is still in the implementation of your PCL version?
Or simply tried reproducing (i.e. copy-pasting) that code yourself?
Seems Wireframe representation doesn't work in your case?
Or maybe you could try adding something along the lines of
"viewer.setShapeRenderingProperties(PCL_VISUALIZER_OPACITY, ...)"? Seems
more like a hack though ...
Thank you for the help!! :)
I use the trunk version and there is no longer "actor->GetProperty ()->SetRepresentationToWireframe ();" in addCube().
But according to solutions you gave, I found a function setRepresentationToWireframeForAllActors() in pcl::visualization::PCLVisualizer, and it works!!