ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MaterialConverter.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 <string>
11 
13 
14 // Forward declarations
15 class ccMaterial;
16 class ccMaterialSet;
17 
18 namespace pcl {
19 struct TexMaterial;
20 }
21 
22 namespace PclUtils {
23 namespace renders {
24 
34 public:
39  const ccMaterial* ccMat);
40 
45  const ::pcl::TexMaterial& pclMat);
46 
51  const ccMaterialSet* materials);
52 
56  static bool HasPBREncoding(const ccMaterial* material);
57 
61  static bool HasMultipleMapKd(const ccMaterialSet* materials);
62 
66  static int CountMapKd(const ccMaterialSet* materials);
67 };
68 
69 } // namespace renders
70 } // namespace PclUtils
Material converter utility.
static VtkUtils::VtkMultiTextureRenderer::PBRMaterial FromCCMaterial(const ccMaterial *ccMat)
Convert ccMaterial to PBRMaterial.
static bool HasPBREncoding(const ccMaterial *material)
Detect if material has PBR encoding.
static int CountMapKd(const ccMaterialSet *materials)
Count map_Kd textures in material set.
static VtkUtils::VtkMultiTextureRenderer::PBRMaterial FromPCLMaterial(const ::pcl::TexMaterial &pclMat)
Convert pcl::TexMaterial to PBRMaterial (deprecated)
static bool HasMultipleMapKd(const ccMaterialSet *materials)
Detect if material set has multiple map_Kd textures.
static VtkUtils::VtkMultiTextureRenderer::PBRMaterial FromMaterialSet(const ccMaterialSet *materials)
Convert first material from ccMaterialSet to PBRMaterial.
Mesh (triangle) material.
Mesh (triangle) material.
Definition: ecvMaterial.h:28
Generic PBR material structure (supports multi-texture)