ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
sm2cc.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 // Local
11 #include <Utils/PCLCloud.h>
12 
13 #include "qPCL.h"
14 
15 // CV_DB_LIB
16 #include <ecvMaterial.h>
17 
18 // system
19 #include <list>
20 
21 class ccMesh;
22 class ccPointCloud;
23 
26 public:
28  static ccMesh* Convert(PCLTextureMesh::ConstPtr textureMesh);
29  static ccPointCloud* Convert(const PCLCloud& pclCloud,
30  bool ignoreScalars = false,
31  bool ignoreRgb = false);
32  static ccMesh* Convert(const PCLCloud& pclCloud,
33  const std::vector<pcl::Vertices>& polygons,
34  bool ignoreScalars = false,
35  bool ignoreRgb = false);
36 
37 public: // other related utility functions
38  static bool CopyXYZ(const PCLCloud& pclCloud,
39  ccPointCloud& ccCloud,
40  uint8_t coordinateType);
41  static bool CopyNormals(const PCLCloud& pclCloud, ccPointCloud& ccCloud);
42  static bool CopyRGB(const PCLCloud& pclCloud, ccPointCloud& ccCloud);
43  static bool CopyScalarField(const PCLCloud& pclCloud,
44  const std::string& sfName,
45  ccPointCloud& ccCloud,
46  bool overwriteIfExist = true);
47 
48  static void FromPCLMaterial(const PCLMaterial& inMaterial,
49  ccMaterial::Shared& outMaterial);
50 };
pcl::TexMaterial PCLMaterial
Definition: PCLCloud.h:32
pcl::PCLPointCloud2 PCLCloud
Definition: PCLCloud.h:34
QSharedPointer< ccMaterial > Shared
Shared type.
Definition: ecvMaterial.h:33
Triangular mesh.
Definition: ecvMesh.h:35
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
PCL to CC cloud converter.
Definition: sm2cc.h:25
static ccMesh * Convert(PCLTextureMesh::ConstPtr textureMesh)
Converts a PCL point cloud to a ccPointCloud.
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15