diff --git a/common/include/pcl/array_types.h b/common/include/pcl/array_types.h new file mode 100644 index 00000000000..55d4c207410 --- /dev/null +++ b/common/include/pcl/array_types.h @@ -0,0 +1,49 @@ +/* + * Software License Agreement (BSD License) + * + * Point Cloud Library (PCL) - www.pointclouds.org + * Copyright (c) 2025-, Open Perception, Inc. + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the copyright holder(s) nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +namespace pcl +{ + using Array3fMap = Eigen::Map; + using Array3fMapConst = const Eigen::Map; + using Array4fMap = Eigen::Map; + using Array4fMapConst = + const Eigen::Map; +} // namespace pcl diff --git a/common/include/pcl/impl/point_types.hpp b/common/include/pcl/impl/point_types.hpp index 88ca63a4d1a..a7ea6283551 100644 --- a/common/include/pcl/impl/point_types.hpp +++ b/common/include/pcl/impl/point_types.hpp @@ -38,12 +38,14 @@ #pragma once +#include // for pcl::Array* types #include // for PCL_MAKE_ALIGNED_OPERATOR_NEW #include // for PCL_XYZ_POINT_TYPES, PCL_NORMAL_POINT_TYPES #include // for PCL_EXPORTS #include // for PCLPointField #include // implementee #include // for POINT_CLOUD_REGISTER_POINT_STRUCT, POINT_CLOUD_REGISTER_POINT_WRAPPER +#include // for pcl::Vector* types #include // for boost::mpl::and_ #include // for boost::mpl::bool_ @@ -184,29 +186,10 @@ namespace pcl template<> struct descriptorSize { static constexpr const int value = 36; }; template struct descriptorSize> { static constexpr const int value = N; }; - template static constexpr int descriptorSize_v = descriptorSize::value; } } - - using Vector2fMap = Eigen::Map; - using Vector2fMapConst = const Eigen::Map; - using Array3fMap = Eigen::Map; - using Array3fMapConst = const Eigen::Map; - using Array4fMap = Eigen::Map; - using Array4fMapConst = const Eigen::Map; - using Vector3fMap = Eigen::Map; - using Vector3fMapConst = const Eigen::Map; - using Vector4fMap = Eigen::Map; - using Vector4fMapConst = const Eigen::Map; - - using Vector3c = Eigen::Matrix; - using Vector3cMap = Eigen::Map; - using Vector3cMapConst = const Eigen::Map; - using Vector4c = Eigen::Matrix; - using Vector4cMap = Eigen::Map; - using Vector4cMapConst = const Eigen::Map; #define PCL_ADD_UNION_POINT4D \ union EIGEN_ALIGN16 { \ diff --git a/common/include/pcl/vector_types.h b/common/include/pcl/vector_types.h new file mode 100644 index 00000000000..b966e3a4317 --- /dev/null +++ b/common/include/pcl/vector_types.h @@ -0,0 +1,58 @@ +/* + * Software License Agreement (BSD License) + * + * Point Cloud Library (PCL) - www.pointclouds.org + * Copyright (c) 2025-, Open Perception, Inc. + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the copyright holder(s) nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +namespace pcl +{ + using Vector2fMap = Eigen::Map; + using Vector2fMapConst = const Eigen::Map; + using Vector3fMap = Eigen::Map; + using Vector3fMapConst = const Eigen::Map; + using Vector4fMap = Eigen::Map; + using Vector4fMapConst = + const Eigen::Map; + + using Vector3c = Eigen::Matrix; + using Vector3cMap = Eigen::Map; + using Vector3cMapConst = const Eigen::Map; + using Vector4c = Eigen::Matrix; + using Vector4cMap = Eigen::Map; + using Vector4cMapConst = const Eigen::Map; +} // namespace pcl