ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Rasterization.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "Cloth.h"
11 #include "wlPointCloud.h"
12 
13 #define SQUARE_DIST(x1, y1, x2, y2) \
14  (((x1) - (x2)) * ((x1) - (x2)) + ((y1) - (y2)) * ((y1) - (y2)))
15 
17 public:
18  // for a cloth particle, if no corresponding lidar point are found.
19  // the heightval are set as its neighbor's
20  double static findHeightValByNeighbor(Particle *p, Cloth &cloth);
21  double static findHeightValByScanline(Particle *p, Cloth &cloth);
22 
23  // 对点云进行最临近搜索,寻找周围最近的N个点 避免求交运算
24  static bool RasterTerrain(Cloth &cloth,
25  const wl::PointCloud &pc,
26  std::vector<double> &heightVal,
27  unsigned KNN = 1);
28 };
Definition: Cloth.h:44
static double findHeightValByNeighbor(Particle *p, Cloth &cloth)
static bool RasterTerrain(Cloth &cloth, const wl::PointCloud &pc, std::vector< double > &heightVal, unsigned KNN=1)
static double findHeightValByScanline(Particle *p, Cloth &cloth)