supereight
Loading...
Searching...
No Matches
eigen_utils.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Smart Robotics Lab, Imperial College London, Technical University of Munich
3 * SPDX-FileCopyrightText: 2023 Sotiris Papatheodorou
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef SE_COMMON_EIGEN_UTILS_HPP
8#define SE_COMMON_EIGEN_UTILS_HPP
9
10#include <Eigen/Geometry>
11
12namespace se {
14namespace eigen {
15
23template<typename ScalarT, int Dim>
24Eigen::AlignedBox<ScalarT, Dim> dilate_erode(const Eigen::AlignedBox<ScalarT, Dim>& box,
25 const ScalarT distance);
26
30template<typename ScalarT, int Mode, int Options>
31Eigen::AlignedBox<ScalarT, 3> transform(const Eigen::Transform<ScalarT, 3, Mode, Options>& T_BA,
32 const Eigen::AlignedBox<ScalarT, 3>& box_A);
33
35template<typename T, typename U, typename V>
36void clamp(Eigen::MatrixBase<T>& x,
37 const Eigen::MatrixBase<U>& low,
38 const Eigen::MatrixBase<V>& high);
39
41template<typename T, typename U, typename V>
42void clamp(Eigen::ArrayBase<T>& x, const Eigen::ArrayBase<U>& low, const Eigen::ArrayBase<V>& high);
43
44} // namespace eigen
45} // namespace se
46
47#include "impl/eigen_utils_impl.hpp"
48
49#endif // SE_COMMON_EIGEN_UTILS_HPP
Definition image.hpp:19
void clamp(Eigen::MatrixBase< T > &x, const Eigen::MatrixBase< U > &low, const Eigen::MatrixBase< V > &high)
Clamp the coefficients of v between those of low and high.
Eigen::AlignedBox< ScalarT, Dim > dilate_erode(const Eigen::AlignedBox< ScalarT, Dim > &box, const ScalarT distance)
Morphologically dilate or erode an axis aligned box by some distance.
Eigen::AlignedBox< ScalarT, 3 > transform(const Eigen::Transform< ScalarT, 3, Mode, Options > &T_BA, const Eigen::AlignedBox< ScalarT, 3 > &box_A)
Transform a 3D axis aligned box box_A expressed in frame A to frame B using the transform T_BA.
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14