|
@@ -5,10 +5,18 @@
|
|
|
#ifndef POINT2D_TOOL_H
|
|
|
#define POINT2D_TOOL_H
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+//#define OPEN_PCL_FLAG
|
|
|
+#ifdef OPEN_PCL_FLAG
|
|
|
#include <pcl/point_types.h>
|
|
|
#include <pcl/PCLPointCloud2.h>
|
|
|
#include <pcl/conversions.h>
|
|
|
#include <pcl/common/common.h>
|
|
|
+#endif
|
|
|
+
|
|
|
+#include <stddef.h>
|
|
|
+#include <math.h>
|
|
|
|
|
|
class Point2D_tool
|
|
|
{
|
|
@@ -67,6 +75,7 @@ public:
|
|
|
//判断平面坐标点是否在限制范围
|
|
|
static bool limit_with_point2D_box(float x, float y, Point2D_tool::Point2D_box* p_point2D_box);
|
|
|
|
|
|
+#ifdef OPEN_PCL_FLAG
|
|
|
//平面坐标的转换, 可以进行旋转和平移, 不能缩放
|
|
|
static bool transform_with_translation_rotation(float* p_x_in, float* p_y_in, float* p_x_out, float* p_y_out,
|
|
|
Point2D_tool::Point2D_transform* p_point2D_transform);
|
|
@@ -75,6 +84,8 @@ public:
|
|
|
static bool transform_with_translation_rotation(pcl::PointCloud<pcl::PointXYZ>::Ptr p_cloud_in,
|
|
|
pcl::PointCloud<pcl::PointXYZ>::Ptr p_cloud_out,
|
|
|
Point2D_tool::Point2D_transform* p_point2D_transform);
|
|
|
+
|
|
|
+#endif
|
|
|
};
|
|
|
|
|
|
|