Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apps] Enable Clang-Format for in_hand_scanner #4804

Merged
Merged
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
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 gpu/segmentation"
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"

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