Skip to content

Commit

Permalink
Enable Clang-Format for in_hand_scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko Thiel committed Jul 2, 2021
1 parent cd3b3f9 commit 8e623d8
Show file tree
Hide file tree
Showing 28 changed files with 3,927 additions and 3,611 deletions.
2 changes: 1 addition & 1 deletion .dev/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

format() {
# don't use a directory with whitespace
local whitelist="apps/3d_rec_framework apps/include apps/modeler apps/src benchmarks 2d geometry ml octree simulation stereo tracking registration gpu/containers"
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"

local PCL_DIR="${2}"
local formatter="${1}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#pragma once

#ifdef __GNUC__
# pragma GCC system_header
#pragma GCC system_header
#endif
PCL_DEPRECATED_HEADER(1, 15, "Please include the needed boost headers directly.")
#include <boost/math/special_functions/fpclassify.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,55 +40,52 @@

#pragma once

#include <cstdint>

#include <pcl/geometry/triangle_mesh.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/geometry/triangle_mesh.h>

namespace pcl
{
namespace ihs
{
struct PointIHS;
using CloudIHS = pcl::PointCloud<PointIHS>;
using CloudIHSPtr = CloudIHS::Ptr;
using CloudIHSConstPtr = CloudIHS::ConstPtr;
} // End namespace ihs
#include <cstdint>

namespace pcl {
namespace ihs {
struct PointIHS;
using CloudIHS = pcl::PointCloud<PointIHS>;
using CloudIHSPtr = CloudIHS::Ptr;
using CloudIHSConstPtr = CloudIHS::ConstPtr;
} // End namespace ihs
} // End namespace pcl

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

POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ihs::_PointIHS,
(float, x, x)
(float, y, y)
(float, z, z)
(float, normal_x, normal_x)
(float, normal_y, normal_y)
(float, normal_z, normal_z)
(float, rgb, rgb)
(float, weight, weight)
(unsigned int, age, age)
(std::uint32_t, directions, directions)
)
POINT_CLOUD_REGISTER_POINT_WRAPPER (pcl::ihs::PointIHS, pcl::ihs::_PointIHS)
// clang-format off
POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::ihs::_PointIHS,
(float, x, x)
(float, y, y)
(float, z, z)
(float, normal_x, normal_x)
(float, normal_y, normal_y)
(float, normal_z, normal_z)
(float, rgb, rgb)
(float, weight, weight)
(unsigned int, age, age)
(std::uint32_t, directions, directions)
)
POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ihs::PointIHS, pcl::ihs::_PointIHS)
// clang-format on

namespace pcl
{
namespace ihs
{
struct MeshTraits
{
using VertexData = PointIHS;
using HalfEdgeData = pcl::geometry::NoData;
using EdgeData = pcl::geometry::NoData;
using FaceData = pcl::geometry::NoData;
using IsManifold = std::true_type;
};
namespace pcl {
namespace ihs {
struct MeshTraits {
using VertexData = PointIHS;
using HalfEdgeData = pcl::geometry::NoData;
using EdgeData = pcl::geometry::NoData;
using FaceData = pcl::geometry::NoData;
using IsManifold = std::true_type;
};

// NOTE: The drawMesh method in pcl::ihs::InHandScanner only supports triangles!
using Mesh = pcl::geometry::TriangleMesh<MeshTraits>;
using MeshPtr = Mesh::Ptr;
using MeshConstPtr = Mesh::ConstPtr;
} // End namespace ihs
// NOTE: The drawMesh method in pcl::ihs::InHandScanner only supports triangles!
using Mesh = pcl::geometry::TriangleMesh<MeshTraits>;
using MeshPtr = Mesh::Ptr;
using MeshConstPtr = Mesh::ConstPtr;
} // End namespace ihs
} // End namespace pcl
4 changes: 2 additions & 2 deletions apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/eigen.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#pragma once

#ifdef __GNUC__
# pragma GCC system_header
#pragma GCC system_header
#endif
PCL_DEPRECATED_HEADER(1, 15, "Please include the needed eigen headers directly.")
#include <Eigen/Cholesky>
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <Eigen/Cholesky>
30 changes: 13 additions & 17 deletions apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/help_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,21 @@

#include <QDialog>

namespace Ui
{
class HelpWindow;
namespace Ui {
class HelpWindow;
}

namespace pcl
{
namespace ihs
{
class HelpWindow : public QDialog
{
Q_OBJECT
namespace pcl {
namespace ihs {
class HelpWindow : public QDialog {
Q_OBJECT

public:
explicit HelpWindow (QWidget* parent = nullptr);
~HelpWindow ();
public:
explicit HelpWindow(QWidget* parent = nullptr);
~HelpWindow();

private:
Ui::HelpWindow* ui;
};
} // End namespace ihs
private:
Ui::HelpWindow* ui;
};
} // End namespace ihs
} // End namespace pcl
Loading

0 comments on commit 8e623d8

Please sign in to comment.