ModelViewer 0.1
Template for CPP projects
Loading...
Searching...
No Matches
model_viewer::material::MTLMaterial Class Referencefinal

Class representing a material parsed from an MTL file. More...

#include <Material.hpp>

Inheritance diagram for model_viewer::material::MTLMaterial:
Collaboration diagram for model_viewer::material::MTLMaterial:

Signals

void KdChanged ()
 Signal emitted when the diffuse color changes.
 
void illuminationChanged ()
 Signal emitted when the illumination model changes.
 
void dChanged ()
 Signal emitted when the opacity changes.
 
void NsChanged ()
 Signal emitted when the specular roughness changes.
 
void sharpnessChanged ()
 Signal emitted when the sharpness changes.
 
void NiChanged ()
 Signal emitted when the index of refraction changes.
 
void metalnessChanged ()
 Signal emitted when the metalness changes.
 
void roughnessChanged ()
 Signal emitted when the roughness changes.
 
void bumpStrengthChanged ()
 Signal emitted when the bump strength changes.
 
void diffuseMapChanged ()
 Signal emitted when the diffuse map changes.
 
void specularReflectionMapChanged ()
 Signal emitted when the specular reflection map changes.
 
void specularMapChanged ()
 Signal emitted when the specular map changes.
 
void emissiveMapChanged ()
 Signal emitted when the emissive map changes.
 
void dissolveMapChanged ()
 Signal emitted when the dissolve map changes.
 
void bumpMapChanged ()
 Signal emitted when the bump map changes.
 

Public Member Functions

 MTLMaterial (QObject *parent=nullptr)
 Constructor.
 
 ~MTLMaterial () override=default
 Destructor.
 
void parseMTL (const std::string &filepath)
 Parse an MTL file and set the material properties.
 
void resetMaterial ()
 Reset the material to default values.
 
const QUrl & getAmbientMap () const
 Get the Ambient Map URL.
 
const QUrl & getDiffuseMap () const
 Get the Diffuse Map URL.
 
const QUrl & getSpecularReflectionMap () const
 Get the Specular Reflection Map URL.
 
const QUrl & getSpecularMap () const
 Get the Specular Map URL.
 
const QUrl & getEmissiveMap () const
 Get the Emissive Map URL.
 
const QUrl & getDissolveMap () const
 Get the Dissolve Map URL.
 
const QUrl & getBumpMap () const
 Get the Bump/Normal Map URL.
 
const QUrl & getDecalMap () const
 Get the Decal Map URL.
 
const QUrl & getDispersionMap () const
 Get the Dispersion Map URL.
 

Properties

QColor diffuseColor
 
qreal illumination
 
qreal metalness
 
qreal roughness
 
qreal bumpStrength
 
qreal opacity
 
qreal indexOfRefraction
 
QUrl diffuseMap
 
QUrl specularReflectionMap
 
QUrl specularMap
 
QUrl emissiveMap
 
QUrl dissolveMap
 
QUrl bumpMap
 

Private Member Functions

void parseMaterial (std::ifstream &file)
 Parse the MTL file line by line.
 
void setMaterialValues ()
 Apply parsed values to the material properties.
 
void parseScalar (const std::string &line, const std::string &key)
 Parse a scalar value from an MTL line.
 
void parseColor (const std::string &line, const std::string &key)
 Parse a color value from an MTL line.
 
void parseMap (const std::string &line, const std::string &key)
 Parse a texture map from an MTL line.
 

Private Attributes

std::filesystem::path _parentPath
 Parent path of the MTL file.
 
QColor _Ka
 Ambient Color.
 
QColor _Kd
 Diffuse Color.
 
QColor _Ks
 Specular Color.
 
QColor _Ke
 Emissive Color.
 
QColor _Tf
 Transmission Filter.
 
qreal _illumination
 Illumination Model.
 
qreal _d
 Opacity.
 
qreal _Ns
 Specular Roughness.
 
qreal _sharpness
 Sharpness.
 
qreal _Ni
 Index of Refraction.
 
qreal _metalness = 0.0
 Metalness.
 
qreal _roughness = 0.0
 Roughness.
 
qreal _bumpStrength = 0.0
 Bump/Normal Strength.
 
QUrl _ambientMap
 Path to the Ambient Map.
 
QUrl _diffuseMap
 Path to the Diffuse Map.
 
QUrl _specularReflectionMap
 Path to the Specular Reflection Map.
 
QUrl _specularMap
 Path to the Specular Map.
 
QUrl _emissiveMap
 Path to the Emissive Map.
 
QUrl _dissolveMap
 Path to the Dissolve Map.
 
QUrl _bumpMap
 Path to the Bump/Normal Map.
 
QUrl _decalMap
 Path to the Decal Map.
 
QUrl _dispersionMap
 Path to the Dispersion Map.
 
std::unordered_map< std::string, qreal > _scalars
 Maps to store parsed values before applying them.
 
std::unordered_map< std::string, QColor > _colors
 Maps to store parsed colors before applying them.
 
std::unordered_map< std::string, QUrl > _maps
 Maps to store parsed texture maps before applying them.
 
std::unordered_map< std::string, std::function< void(const std::string &, const std::string &)> > _parseFunctions
 Map of parsing functions for different MTL line prefixes.
 

Detailed Description

Class representing a material parsed from an MTL file.

Todo
Seek ways to improve this class' architecture

Constructor & Destructor Documentation

◆ MTLMaterial()

model_viewer::material::MTLMaterial::MTLMaterial ( QObject * parent = nullptr)
explicit

Constructor.

Parameters
parentParent QObject, nullptr by default
12 : QObject(parent) {
14 {"Ka", [this](const std::string &l,
15 const std::string &k) { parseColor(l, k); }},
16 {"Kd", [this](const std::string &l,
17 const std::string &k) { parseColor(l, k); }},
18 {"Ks", [this](const std::string &l,
19 const std::string &k) { parseColor(l, k); }},
20 {"Ke", [this](const std::string &l,
21 const std::string &k) { parseColor(l, k); }},
22 {"Tf", [this](const std::string &l,
23 const std::string &k) { parseColor(l, k); }},
24 {"illum", [this](const std::string &l,
25 const std::string &k) { parseScalar(l, k); }},
26 {"d", [this](const std::string &l,
27 const std::string &k) { parseScalar(l, k); }},
28 {"sharpness", [this](const std::string &l,
29 const std::string &k) { parseScalar(l, k); }},
30 {"Ni", [this](const std::string &l,
31 const std::string &k) { parseScalar(l, k); }},
32 {"map_Ka", [this](const std::string &l,
33 const std::string &k) { parseMap(l, k); }},
34 {"map_Kd", [this](const std::string &l,
35 const std::string &k) { parseMap(l, k); }},
36 {"map_Ks", [this](const std::string &l,
37 const std::string &k) { parseMap(l, k); }},
38 {"map_Ns", [this](const std::string &l,
39 const std::string &k) { parseMap(l, k); }},
40 {"map_Ke", [this](const std::string &l,
41 const std::string &k) { parseMap(l, k); }},
42 {"bump", [this](const std::string &l,
43 const std::string &k) { parseMap(l, k); }},
44 {"decal", [this](const std::string &l,
45 const std::string &k) { parseMap(l, k); }},
46 {"disp", [this](const std::string &l,
47 const std::string &k) { parseMap(l, k); }},
48 };
49}
std::unordered_map< std::string, std::function< void(const std::string &, const std::string &)> > _parseFunctions
Map of parsing functions for different MTL line prefixes.
Definition Material.hpp:132
void parseMap(const std::string &line, const std::string &key)
Parse a texture map from an MTL line.
Definition Material.cpp:133
void parseColor(const std::string &line, const std::string &key)
Parse a color value from an MTL line.
Definition Material.cpp:122
void parseScalar(const std::string &line, const std::string &key)
Parse a scalar value from an MTL line.
Definition Material.cpp:112

References _parseFunctions, parseColor(), parseMap(), and parseScalar().

Here is the call graph for this function:

◆ ~MTLMaterial()

model_viewer::material::MTLMaterial::~MTLMaterial ( )
overridedefault

Destructor.

Member Function Documentation

◆ bumpMapChanged

void model_viewer::material::MTLMaterial::bumpMapChanged ( )
signal

Signal emitted when the bump map changes.

◆ bumpStrengthChanged

void model_viewer::material::MTLMaterial::bumpStrengthChanged ( )
signal

Signal emitted when the bump strength changes.

◆ dChanged

void model_viewer::material::MTLMaterial::dChanged ( )
signal

Signal emitted when the opacity changes.

◆ diffuseMapChanged

void model_viewer::material::MTLMaterial::diffuseMapChanged ( )
signal

Signal emitted when the diffuse map changes.

◆ dissolveMapChanged

void model_viewer::material::MTLMaterial::dissolveMapChanged ( )
signal

Signal emitted when the dissolve map changes.

◆ emissiveMapChanged

void model_viewer::material::MTLMaterial::emissiveMapChanged ( )
signal

Signal emitted when the emissive map changes.

◆ getAmbientMap()

const QUrl & model_viewer::material::MTLMaterial::getAmbientMap ( ) const
inline

Get the Ambient Map URL.

Returns
Ambient Map URL
157{ return _ambientMap; };
QUrl _ambientMap
Path to the Ambient Map.
Definition Material.hpp:94

References _ambientMap.

◆ getBumpMap()

const QUrl & model_viewer::material::MTLMaterial::getBumpMap ( ) const
inline

Get the Bump/Normal Map URL.

Returns
Bump/Normal Map URL
195{ return _bumpMap; };
QUrl _bumpMap
Path to the Bump/Normal Map.
Definition Material.hpp:112

References _bumpMap.

◆ getDecalMap()

const QUrl & model_viewer::material::MTLMaterial::getDecalMap ( ) const
inline

Get the Decal Map URL.

Returns
Decal Map URL
201{ return _decalMap; };
QUrl _decalMap
Path to the Decal Map.
Definition Material.hpp:115

References _decalMap.

◆ getDiffuseMap()

const QUrl & model_viewer::material::MTLMaterial::getDiffuseMap ( ) const
inline

Get the Diffuse Map URL.

Returns
Diffuse Map URL
163{ return _diffuseMap; };
QUrl _diffuseMap
Path to the Diffuse Map.
Definition Material.hpp:97

References _diffuseMap.

◆ getDispersionMap()

const QUrl & model_viewer::material::MTLMaterial::getDispersionMap ( ) const
inline

Get the Dispersion Map URL.

Returns
Dispersion Map URL
207{ return _dispersionMap; };
QUrl _dispersionMap
Path to the Dispersion Map.
Definition Material.hpp:118

References _dispersionMap.

◆ getDissolveMap()

const QUrl & model_viewer::material::MTLMaterial::getDissolveMap ( ) const
inline

Get the Dissolve Map URL.

Returns
Dissolve Map URL
189{ return _dissolveMap; };
QUrl _dissolveMap
Path to the Dissolve Map.
Definition Material.hpp:109

References _dissolveMap.

◆ getEmissiveMap()

const QUrl & model_viewer::material::MTLMaterial::getEmissiveMap ( ) const
inline

Get the Emissive Map URL.

Returns
Emissive Map URL
183{ return _emissiveMap; };
QUrl _emissiveMap
Path to the Emissive Map.
Definition Material.hpp:106

References _emissiveMap.

◆ getSpecularMap()

const QUrl & model_viewer::material::MTLMaterial::getSpecularMap ( ) const
inline

Get the Specular Map URL.

Returns
Specular Map URL
177{ return _specularMap; };
QUrl _specularMap
Path to the Specular Map.
Definition Material.hpp:103

References _specularMap.

◆ getSpecularReflectionMap()

const QUrl & model_viewer::material::MTLMaterial::getSpecularReflectionMap ( ) const
inline

Get the Specular Reflection Map URL.

Returns
Specular Reflection Map URL
169 {
171 };
QUrl _specularReflectionMap
Path to the Specular Reflection Map.
Definition Material.hpp:100

References _specularReflectionMap.

◆ illuminationChanged

void model_viewer::material::MTLMaterial::illuminationChanged ( )
signal

Signal emitted when the illumination model changes.

◆ KdChanged

void model_viewer::material::MTLMaterial::KdChanged ( )
signal

Signal emitted when the diffuse color changes.

◆ metalnessChanged

void model_viewer::material::MTLMaterial::metalnessChanged ( )
signal

Signal emitted when the metalness changes.

◆ NiChanged

void model_viewer::material::MTLMaterial::NiChanged ( )
signal

Signal emitted when the index of refraction changes.

◆ NsChanged

void model_viewer::material::MTLMaterial::NsChanged ( )
signal

Signal emitted when the specular roughness changes.

◆ parseColor()

void model_viewer::material::MTLMaterial::parseColor ( const std::string & line,
const std::string & key )
private

Parse a color value from an MTL line.

Parameters
lineLine to parse
keyKey of the color value
122 {
123 float r, g, b;
124 const std::string lineTrimmed =
125 string_helpers::trim_copy(line.substr(key.size() + 1));
126 if (std::sscanf(lineTrimmed.c_str(), "%f %f %f", &r, &g, &b) < 3)
127 std::cerr << "Invalid color at line " << line << std::endl;
128 else
129 _colors[key] = {static_cast<int>(r * 255), static_cast<int>(g * 255),
130 static_cast<int>(b * 255)};
131}
std::unordered_map< std::string, QColor > _colors
Maps to store parsed colors before applying them.
Definition Material.hpp:124
std::string trim_copy(std::string s)
Trim from both ends (copying)
Definition StringHelpers.hpp:78

References _colors, and model_viewer::string_helpers::trim_copy().

Referenced by MTLMaterial().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseMap()

void model_viewer::material::MTLMaterial::parseMap ( const std::string & line,
const std::string & key )
private

Parse a texture map from an MTL line.

Parameters
lineLine to parse
keyKey of the texture map
133 {
134 const std::string map =
135 string_helpers::trim_copy(line.substr(key.size() + 1));
136 if (map.empty()) std::cerr << "Empty map at line " << line << std::endl;
137 const std::string mapPath = (_parentPath / map).string();
138 _maps[key] = QUrl::fromLocalFile(mapPath.c_str());
139}
std::unordered_map< std::string, QUrl > _maps
Maps to store parsed texture maps before applying them.
Definition Material.hpp:127
std::filesystem::path _parentPath
Parent path of the MTL file.
Definition Material.hpp:52

References _maps, _parentPath, and model_viewer::string_helpers::trim_copy().

Referenced by MTLMaterial().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseMaterial()

void model_viewer::material::MTLMaterial::parseMaterial ( std::ifstream & file)
private

Parse the MTL file line by line.

Parameters
fileInput file stream to parse
Todo
Optimize parsing of the material
63 {
64 std::string line;
65 while (std::getline(file, line)) {
66 const auto pos = line.find(' ');
67 const std::string lineStart =
68 string_helpers::trim_copy(line.substr(0, pos));
69 if (_parseFunctions.contains(lineStart))
70 _parseFunctions.at(lineStart)(line, lineStart);
71 }
72}

References _parseFunctions, and model_viewer::string_helpers::trim_copy().

Referenced by parseMTL().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseMTL()

void model_viewer::material::MTLMaterial::parseMTL ( const std::string & filepath)

Parse an MTL file and set the material properties.

Parameters
filepathPath to the MTL file
51 {
52 std::ifstream in(filepath);
53 if (!in.is_open()) {
54 std::cerr << "MTLMaterial: Could not open file " << filepath << ": "
55 << std::strerror(errno) << std::endl;
56 return;
57 }
58 _parentPath = std::filesystem::path(filepath).parent_path();
59 parseMaterial(in);
61}
void parseMaterial(std::ifstream &file)
Parse the MTL file line by line.
Definition Material.cpp:63
void setMaterialValues()
Apply parsed values to the material properties.
Definition Material.cpp:84

References _parentPath, parseMaterial(), and setMaterialValues().

Here is the call graph for this function:

◆ parseScalar()

void model_viewer::material::MTLMaterial::parseScalar ( const std::string & line,
const std::string & key )
private

Parse a scalar value from an MTL line.

Parameters
lineLine to parse
keyKey of the scalar value
112 {
113 float scalar;
114 const std::string lineTrimmed =
115 string_helpers::trim_copy(line.substr(key.size() + 1));
116 if (std::sscanf(lineTrimmed.c_str(), "%f", &scalar) < 1)
117 std::cerr << "Invalid scalar at line " << line << std::endl;
118 else
119 _scalars[key] = scalar;
120}
std::unordered_map< std::string, qreal > _scalars
Maps to store parsed values before applying them.
Definition Material.hpp:121

References _scalars, and model_viewer::string_helpers::trim_copy().

Referenced by MTLMaterial().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetMaterial()

void model_viewer::material::MTLMaterial::resetMaterial ( )

Reset the material to default values.

74 {
75 _scalars.clear();
76 _colors.clear();
77 _maps.clear();
78 _scalars["d"] = 1.0;
79 _scalars["illum"] = 1.0;
80 _colors["Kd"] = QColor(255, 255, 255);
82}

References _colors, _maps, _scalars, and setMaterialValues().

Here is the call graph for this function:

◆ roughnessChanged

void model_viewer::material::MTLMaterial::roughnessChanged ( )
signal

Signal emitted when the roughness changes.

◆ setMaterialValues()

void model_viewer::material::MTLMaterial::setMaterialValues ( )
private

Apply parsed values to the material properties.

84 {
85 _Ka = _colors["Ka"];
86 _Kd = _colors["Kd"];
87 _Ks = _colors["Ks"];
88 _Tf = _colors["Tf"];
89 _Ke = _colors["ke"];
90
91 _illumination = _scalars["illum"];
92 _d = _scalars["d"];
93 _Ns = _scalars["Ns"];
94 _sharpness = _scalars["sharpness"];
95 _Ni = _scalars["Ni"];
96
97 _ambientMap = _maps["map_Ka"];
98 _diffuseMap = _maps["map_Kd"];
99 _specularReflectionMap = _maps["map_Ks"];
100 _specularMap = _maps["map_Ns"];
101 _emissiveMap = _maps["map_Ke"];
102 _dissolveMap = _maps["map_d"];
103 _bumpMap = _maps["bump"];
104 _decalMap = _maps["decal"];
105 _dispersionMap = _maps["disp"];
106
107 _roughness = std::clamp(1.0 - std::pow(_Ns / 100.0, 0.25), 0.04, 1.0);
108 _metalness =
109 std::clamp((_Ks.red() + _Ks.green() + _Ks.blue()) / 3.0, 0.0, 1.0);
110}
QColor _Kd
Diffuse Color.
Definition Material.hpp:58
qreal _d
Opacity.
Definition Material.hpp:73
qreal _sharpness
Sharpness.
Definition Material.hpp:79
QColor _Ke
Emissive Color.
Definition Material.hpp:64
QColor _Tf
Transmission Filter.
Definition Material.hpp:67
qreal _illumination
Illumination Model.
Definition Material.hpp:70
qreal _roughness
Roughness.
Definition Material.hpp:88
QColor _Ks
Specular Color.
Definition Material.hpp:61
qreal _Ni
Index of Refraction.
Definition Material.hpp:82
QColor _Ka
Ambient Color.
Definition Material.hpp:55
qreal _Ns
Specular Roughness.
Definition Material.hpp:76
qreal _metalness
Metalness.
Definition Material.hpp:85

References _ambientMap, _bumpMap, _colors, _d, _decalMap, _diffuseMap, _dispersionMap, _dissolveMap, _emissiveMap, _illumination, _Ka, _Kd, _Ke, _Ks, _maps, _metalness, _Ni, _Ns, _roughness, _scalars, _sharpness, _specularMap, _specularReflectionMap, and _Tf.

Referenced by parseMTL(), and resetMaterial().

Here is the caller graph for this function:

◆ sharpnessChanged

void model_viewer::material::MTLMaterial::sharpnessChanged ( )
signal

Signal emitted when the sharpness changes.

◆ specularMapChanged

void model_viewer::material::MTLMaterial::specularMapChanged ( )
signal

Signal emitted when the specular map changes.

◆ specularReflectionMapChanged

void model_viewer::material::MTLMaterial::specularReflectionMapChanged ( )
signal

Signal emitted when the specular reflection map changes.

Member Data Documentation

◆ _ambientMap

QUrl model_viewer::material::MTLMaterial::_ambientMap
private

Path to the Ambient Map.

Referenced by getAmbientMap(), and setMaterialValues().

◆ _bumpMap

QUrl model_viewer::material::MTLMaterial::_bumpMap
private

Path to the Bump/Normal Map.

Referenced by getBumpMap(), and setMaterialValues().

◆ _bumpStrength

qreal model_viewer::material::MTLMaterial::_bumpStrength = 0.0
private

Bump/Normal Strength.

◆ _colors

std::unordered_map<std::string, QColor> model_viewer::material::MTLMaterial::_colors
private

Maps to store parsed colors before applying them.

Referenced by parseColor(), resetMaterial(), and setMaterialValues().

◆ _d

qreal model_viewer::material::MTLMaterial::_d
private

Opacity.

Referenced by setMaterialValues().

◆ _decalMap

QUrl model_viewer::material::MTLMaterial::_decalMap
private

Path to the Decal Map.

Referenced by getDecalMap(), and setMaterialValues().

◆ _diffuseMap

QUrl model_viewer::material::MTLMaterial::_diffuseMap
private

Path to the Diffuse Map.

Referenced by getDiffuseMap(), and setMaterialValues().

◆ _dispersionMap

QUrl model_viewer::material::MTLMaterial::_dispersionMap
private

Path to the Dispersion Map.

Referenced by getDispersionMap(), and setMaterialValues().

◆ _dissolveMap

QUrl model_viewer::material::MTLMaterial::_dissolveMap
private

Path to the Dissolve Map.

Referenced by getDissolveMap(), and setMaterialValues().

◆ _emissiveMap

QUrl model_viewer::material::MTLMaterial::_emissiveMap
private

Path to the Emissive Map.

Referenced by getEmissiveMap(), and setMaterialValues().

◆ _illumination

qreal model_viewer::material::MTLMaterial::_illumination
private

Illumination Model.

Referenced by setMaterialValues().

◆ _Ka

QColor model_viewer::material::MTLMaterial::_Ka
private

Ambient Color.

Referenced by setMaterialValues().

◆ _Kd

QColor model_viewer::material::MTLMaterial::_Kd
private

Diffuse Color.

Referenced by setMaterialValues().

◆ _Ke

QColor model_viewer::material::MTLMaterial::_Ke
private

Emissive Color.

Referenced by setMaterialValues().

◆ _Ks

QColor model_viewer::material::MTLMaterial::_Ks
private

Specular Color.

Referenced by setMaterialValues().

◆ _maps

std::unordered_map<std::string, QUrl> model_viewer::material::MTLMaterial::_maps
private

Maps to store parsed texture maps before applying them.

Referenced by parseMap(), resetMaterial(), and setMaterialValues().

◆ _metalness

qreal model_viewer::material::MTLMaterial::_metalness = 0.0
private

Metalness.

Referenced by setMaterialValues().

◆ _Ni

qreal model_viewer::material::MTLMaterial::_Ni
private

Index of Refraction.

Referenced by setMaterialValues().

◆ _Ns

qreal model_viewer::material::MTLMaterial::_Ns
private

Specular Roughness.

Referenced by setMaterialValues().

◆ _parentPath

std::filesystem::path model_viewer::material::MTLMaterial::_parentPath
private

Parent path of the MTL file.

Referenced by parseMap(), and parseMTL().

◆ _parseFunctions

std::unordered_map<std::string, std::function<void(const std::string &, const std::string &)> > model_viewer::material::MTLMaterial::_parseFunctions
private

Map of parsing functions for different MTL line prefixes.

Referenced by MTLMaterial(), and parseMaterial().

◆ _roughness

qreal model_viewer::material::MTLMaterial::_roughness = 0.0
private

Roughness.

Referenced by setMaterialValues().

◆ _scalars

std::unordered_map<std::string, qreal> model_viewer::material::MTLMaterial::_scalars
private

Maps to store parsed values before applying them.

Referenced by parseScalar(), resetMaterial(), and setMaterialValues().

◆ _sharpness

qreal model_viewer::material::MTLMaterial::_sharpness
private

Sharpness.

Referenced by setMaterialValues().

◆ _specularMap

QUrl model_viewer::material::MTLMaterial::_specularMap
private

Path to the Specular Map.

Referenced by getSpecularMap(), and setMaterialValues().

◆ _specularReflectionMap

QUrl model_viewer::material::MTLMaterial::_specularReflectionMap
private

Path to the Specular Reflection Map.

Referenced by getSpecularReflectionMap(), and setMaterialValues().

◆ _Tf

QColor model_viewer::material::MTLMaterial::_Tf
private

Transmission Filter.

Referenced by setMaterialValues().

Property Documentation

◆ bumpMap

QUrl model_viewer::material::MTLMaterial::bumpMap
read

◆ bumpStrength

qreal model_viewer::material::MTLMaterial::bumpStrength

◆ diffuseColor

QColor model_viewer::material::MTLMaterial::diffuseColor

◆ diffuseMap

QUrl model_viewer::material::MTLMaterial::diffuseMap
read

◆ dissolveMap

QUrl model_viewer::material::MTLMaterial::dissolveMap
read

◆ emissiveMap

QUrl model_viewer::material::MTLMaterial::emissiveMap
read

◆ illumination

qreal model_viewer::material::MTLMaterial::illumination

◆ indexOfRefraction

qreal model_viewer::material::MTLMaterial::indexOfRefraction

◆ metalness

qreal model_viewer::material::MTLMaterial::metalness

◆ opacity

qreal model_viewer::material::MTLMaterial::opacity

◆ roughness

qreal model_viewer::material::MTLMaterial::roughness

◆ specularMap

QUrl model_viewer::material::MTLMaterial::specularMap
read

◆ specularReflectionMap

QUrl model_viewer::material::MTLMaterial::specularReflectionMap
read

The documentation for this class was generated from the following files: