Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions common/include/pcl/array_types.h
Original file line number Diff line number Diff line change
@@ -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 <Eigen/Core>

namespace pcl
{
using Array3fMap = Eigen::Map<Eigen::Array3f>;
using Array3fMapConst = const Eigen::Map<const Eigen::Array3f>;
using Array4fMap = Eigen::Map<Eigen::Array4f, Eigen::Aligned>;
using Array4fMapConst =
const Eigen::Map<const Eigen::Array4f, Eigen::Aligned>;
} // namespace pcl
21 changes: 2 additions & 19 deletions common/include/pcl/impl/point_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@

#pragma once

#include <pcl/array_types.h> // for pcl::Array* types
#include <pcl/memory.h> // for PCL_MAKE_ALIGNED_OPERATOR_NEW
#include <pcl/pcl_config.h> // for PCL_XYZ_POINT_TYPES, PCL_NORMAL_POINT_TYPES
#include <pcl/pcl_macros.h> // for PCL_EXPORTS
#include <pcl/PCLPointField.h> // for PCLPointField
#include <pcl/point_types.h> // implementee
#include <pcl/register_point_struct.h> // for POINT_CLOUD_REGISTER_POINT_STRUCT, POINT_CLOUD_REGISTER_POINT_WRAPPER
#include <pcl/vector_types.h> // for pcl::Vector* types

#include <boost/mpl/and.hpp> // for boost::mpl::and_
#include <boost/mpl/bool.hpp> // for boost::mpl::bool_
Expand Down Expand Up @@ -184,29 +186,10 @@ namespace pcl
template<> struct descriptorSize<Narf36> { static constexpr const int value = 36; };
template<int N> struct descriptorSize<Histogram<N>> { static constexpr const int value = N; };


template<typename FeaturePointT>
static constexpr int descriptorSize_v = descriptorSize<FeaturePointT>::value;
}
}

using Vector2fMap = Eigen::Map<Eigen::Vector2f>;
using Vector2fMapConst = const Eigen::Map<const Eigen::Vector2f>;
using Array3fMap = Eigen::Map<Eigen::Array3f>;
using Array3fMapConst = const Eigen::Map<const Eigen::Array3f>;
using Array4fMap = Eigen::Map<Eigen::Array4f, Eigen::Aligned>;
using Array4fMapConst = const Eigen::Map<const Eigen::Array4f, Eigen::Aligned>;
using Vector3fMap = Eigen::Map<Eigen::Vector3f>;
using Vector3fMapConst = const Eigen::Map<const Eigen::Vector3f>;
using Vector4fMap = Eigen::Map<Eigen::Vector4f, Eigen::Aligned>;
using Vector4fMapConst = const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned>;

using Vector3c = Eigen::Matrix<std::uint8_t, 3, 1>;
using Vector3cMap = Eigen::Map<Vector3c>;
using Vector3cMapConst = const Eigen::Map<const Vector3c>;
using Vector4c = Eigen::Matrix<std::uint8_t, 4, 1>;
using Vector4cMap = Eigen::Map<Vector4c, Eigen::Aligned>;
using Vector4cMapConst = const Eigen::Map<const Vector4c, Eigen::Aligned>;

#define PCL_ADD_UNION_POINT4D \
union EIGEN_ALIGN16 { \
Expand Down
58 changes: 58 additions & 0 deletions common/include/pcl/vector_types.h
Original file line number Diff line number Diff line change
@@ -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 <Eigen/Core>

namespace pcl
{
using Vector2fMap = Eigen::Map<Eigen::Vector2f>;
using Vector2fMapConst = const Eigen::Map<const Eigen::Vector2f>;
using Vector3fMap = Eigen::Map<Eigen::Vector3f>;
using Vector3fMapConst = const Eigen::Map<const Eigen::Vector3f>;
using Vector4fMap = Eigen::Map<Eigen::Vector4f, Eigen::Aligned>;
using Vector4fMapConst =
const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned>;

using Vector3c = Eigen::Matrix<std::uint8_t, 3, 1>;
using Vector3cMap = Eigen::Map<Vector3c>;
using Vector3cMapConst = const Eigen::Map<const Vector3c>;
using Vector4c = Eigen::Matrix<std::uint8_t, 4, 1>;
using Vector4cMap = Eigen::Map<Vector4c, Eigen::Aligned>;
using Vector4cMapConst = const Eigen::Map<const Vector4c, Eigen::Aligned>;
} // namespace pcl
Loading