-
-
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
TextureMapping template is now also defined for PointNormal. #929
Conversation
typedef boost::shared_ptr< const TextureMapping < PointInT > > ConstPtr; | ||
|
||
typedef boost::shared_ptr< PointInT > PointPtr; | ||
typedef boost::shared_ptr< const PointInT > ConstPointPtr; |
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.
boost::shared_ptr<PointInT>
is really useless. Obviously lines 102/103 had a typo in the first place, so no need to keep these pointer-to-point typedefs.
Great find! I would like to merge this, but please first see the comments I left. |
OK I'm doing the suggested correction. Should I add some other point types, like PointXYZRGBNormal, PointXYZRGB, PointXYZRGBA ? |
It's common to have two branches, one with a minimalistic set of types, and the other "all-inclusive". Something like: #ifdef PCL_ONLY_CORE_POINT_TYPES
PCL_INSTANTIATE(TextureMapping, (pcl::PointXYZ))
#else
PCL_INSTANTIATE(TextureMapping, (PCL_XYZ_POINT_TYPES))
#endif |
Done! |
Can you please squash the commits into one? (Have a look at |
Hum, is it possible to do this without creating a new branch? |
Yes it is possible, follow the instructions given at taketwo's link! In short: At this point you will see a list of 2 commits (read the comments at the end) To push the modifications do a You need to specify the |
…ther types should be straightforward TextureMapping: removed ::PointPtr typedef, added instanciation for all PCL_XYZ_POINT_TYPES
I see, I thought forcing the push could do some nasty things ;) |
Yes, generally force pushing should be avoided because it changes (already public) history. In case of a pull request, however, the history is not important. What is important is that we have a clean history once it's merged :) Thanks for the contribution! |
TextureMapping template is now also defined for PointNormal.
The pcl::TextureMapping template was only defined for PointXYZ, and some hardcoded types in the implementation prevented the simple instanciation for new point types.
This has been corrected, it is now also instanciated for PointNormal (which has been tested). More types could be added but were not tested.
Also, the TextureMapping::Ptr subtype was refering to shared_ptr, which is not the common thing in PCL. This has been modified so that it now refers to shared_ptr<TextureMapping<...>>, and a new TextureMapping::PointPtr subtype has been added.