参考:
How to add a new PointT type
To add a new point type, you first have to define it. For example:
|
|
|
Then, you need to make sure your code includes the template header implementation of the specific class/algorithm in PCL that you want your new point type MyPointType to work with. For example, say you want to use pcl::PassThrough. All you would have to do is:
If your code is part of the library, which gets used by others, it might also make sense to try to use explicit instantiations for your MyPointType types, for any classes that you expose (from PCL our outside PCL).
Note
Starting with PCL-1.7 you need to define PCL_NO_PRECOMPILE before you include any PCL headers to include the templated algorithms as well.
Example
The following code snippet example creates a new point type that contains XYZ data (SSE padded), together with a test float.
|
|
|
本文介绍如何在Point Cloud Library (PCL) 中定义并使用新的点类型。首先需要定义点类型的结构,然后确保代码包含了特定算法的模板实现头文件。通过示例展示了创建包含XYZ数据和额外字段的新点类型的过程。
603

被折叠的 条评论
为什么被折叠?



