Skip to content

Commit 73f77da

Browse files
author
Heiko Thiel
committed
Enable Clang-Format for in_hand_scanner
1 parent 5a3c9ee commit 73f77da

28 files changed

+3925
-3610
lines changed

.dev/format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
format() {
1010
# don't use a directory with whitespace
11-
local whitelist="apps/3d_rec_framework apps/include apps/modeler apps/src benchmarks 2d geometry ml octree simulation stereo tracking registration gpu/containers gpu/segmentation"
11+
local whitelist="apps/3d_rec_framework apps/in_hand_scanner apps/include apps/modeler apps/src benchmarks 2d geometry ml octree simulation stereo tracking registration gpu/containers gpu/segmentation"
1212

1313
local PCL_DIR="${2}"
1414
local formatter="${1}"

apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/boost.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#pragma once
4242

4343
#ifdef __GNUC__
44-
# pragma GCC system_header
44+
#pragma GCC system_header
4545
#endif
4646
PCL_DEPRECATED_HEADER(1, 15, "Please include the needed boost headers directly.")
4747
#include <boost/math/special_functions/fpclassify.hpp>

apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/common_types.h

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -40,55 +40,52 @@
4040

4141
#pragma once
4242

43-
#include <cstdint>
44-
43+
#include <pcl/geometry/triangle_mesh.h>
4544
#include <pcl/point_cloud.h>
4645
#include <pcl/point_types.h>
47-
#include <pcl/geometry/triangle_mesh.h>
4846

49-
namespace pcl
50-
{
51-
namespace ihs
52-
{
53-
struct PointIHS;
54-
using CloudIHS = pcl::PointCloud<PointIHS>;
55-
using CloudIHSPtr = CloudIHS::Ptr;
56-
using CloudIHSConstPtr = CloudIHS::ConstPtr;
57-
} // End namespace ihs
47+
#include <cstdint>
48+
49+
namespace pcl {
50+
namespace ihs {
51+
struct PointIHS;
52+
using CloudIHS = pcl::PointCloud<PointIHS>;
53+
using CloudIHSPtr = CloudIHS::Ptr;
54+
using CloudIHSConstPtr = CloudIHS::ConstPtr;
55+
} // End namespace ihs
5856
} // End namespace pcl
5957

6058
#include <pcl/apps/in_hand_scanner/impl/common_types.hpp>
6159

62-
POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ihs::_PointIHS,
63-
(float, x, x)
64-
(float, y, y)
65-
(float, z, z)
66-
(float, normal_x, normal_x)
67-
(float, normal_y, normal_y)
68-
(float, normal_z, normal_z)
69-
(float, rgb, rgb)
70-
(float, weight, weight)
71-
(unsigned int, age, age)
72-
(std::uint32_t, directions, directions)
73-
)
74-
POINT_CLOUD_REGISTER_POINT_WRAPPER (pcl::ihs::PointIHS, pcl::ihs::_PointIHS)
60+
// clang-format off
61+
POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::ihs::_PointIHS,
62+
(float, x, x)
63+
(float, y, y)
64+
(float, z, z)
65+
(float, normal_x, normal_x)
66+
(float, normal_y, normal_y)
67+
(float, normal_z, normal_z)
68+
(float, rgb, rgb)
69+
(float, weight, weight)
70+
(unsigned int, age, age)
71+
(std::uint32_t, directions, directions)
72+
)
73+
POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ihs::PointIHS, pcl::ihs::_PointIHS)
74+
// clang-format on
7575

76-
namespace pcl
77-
{
78-
namespace ihs
79-
{
80-
struct MeshTraits
81-
{
82-
using VertexData = PointIHS;
83-
using HalfEdgeData = pcl::geometry::NoData;
84-
using EdgeData = pcl::geometry::NoData;
85-
using FaceData = pcl::geometry::NoData;
86-
using IsManifold = std::true_type;
87-
};
76+
namespace pcl {
77+
namespace ihs {
78+
struct MeshTraits {
79+
using VertexData = PointIHS;
80+
using HalfEdgeData = pcl::geometry::NoData;
81+
using EdgeData = pcl::geometry::NoData;
82+
using FaceData = pcl::geometry::NoData;
83+
using IsManifold = std::true_type;
84+
};
8885

89-
// NOTE: The drawMesh method in pcl::ihs::InHandScanner only supports triangles!
90-
using Mesh = pcl::geometry::TriangleMesh<MeshTraits>;
91-
using MeshPtr = Mesh::Ptr;
92-
using MeshConstPtr = Mesh::ConstPtr;
93-
} // End namespace ihs
86+
// NOTE: The drawMesh method in pcl::ihs::InHandScanner only supports triangles!
87+
using Mesh = pcl::geometry::TriangleMesh<MeshTraits>;
88+
using MeshPtr = Mesh::Ptr;
89+
using MeshConstPtr = Mesh::ConstPtr;
90+
} // End namespace ihs
9491
} // End namespace pcl

apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/eigen.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
#pragma once
4242

4343
#ifdef __GNUC__
44-
# pragma GCC system_header
44+
#pragma GCC system_header
4545
#endif
4646
PCL_DEPRECATED_HEADER(1, 15, "Please include the needed eigen headers directly.")
47+
#include <Eigen/Cholesky>
4748
#include <Eigen/Core>
4849
#include <Eigen/Geometry>
49-
#include <Eigen/Cholesky>

apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/help_window.h

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,21 @@
4242

4343
#include <QDialog>
4444

45-
namespace Ui
46-
{
47-
class HelpWindow;
45+
namespace Ui {
46+
class HelpWindow;
4847
}
4948

50-
namespace pcl
51-
{
52-
namespace ihs
53-
{
54-
class HelpWindow : public QDialog
55-
{
56-
Q_OBJECT
49+
namespace pcl {
50+
namespace ihs {
51+
class HelpWindow : public QDialog {
52+
Q_OBJECT
5753

58-
public:
59-
explicit HelpWindow (QWidget* parent = nullptr);
60-
~HelpWindow ();
54+
public:
55+
explicit HelpWindow(QWidget* parent = nullptr);
56+
~HelpWindow();
6157

62-
private:
63-
Ui::HelpWindow* ui;
64-
};
65-
} // End namespace ihs
58+
private:
59+
Ui::HelpWindow* ui;
60+
};
61+
} // End namespace ihs
6662
} // End namespace pcl

0 commit comments

Comments
 (0)