Class representing a material specification.
More...
#include <Material.h>
|
| Material ()=default |
| Material default constructor.
|
|
| Material (const Material &sp) |
|
float * | getKd (float factor) |
| Obtain specular component. More...
|
|
void | setSpecularity () |
| Compute the specularity \(s\). More...
|
|
float | getKa0 () |
| PyHelios getter to obtain first ambient component. More...
|
|
void | setKa0 (double ka0) |
| PyHelios setter to set first ambient component. More...
|
|
float | getKa1 () |
| PyHelios getter to obtain second ambient component. More...
|
|
void | setKa1 (double ka1) |
| PyHelios setter to set second ambient component. More...
|
|
float | getKa2 () |
| PyHelios getter to obtain third ambient component. More...
|
|
void | setKa2 (double ka2) |
| PyHelios setter to obtain third ambient component. More...
|
|
float | getKa3 () |
| PyHelios getter to obtain fourth ambient component. More...
|
|
void | setKa3 (double ka3) |
| PyHelios setter to set fourth ambient component. More...
|
|
float | getKd0 () |
| PyHelios getter to obtain first diffuse component. More...
|
|
void | setKd0 (double kd0) |
| PyHelios setter to set first diffuse component. More...
|
|
float | getKd1 () |
| PyHelios getter to obtain second diffuse component. More...
|
|
void | setKd1 (double kd1) |
| PyHelios setter to obtain second diffuse component. More...
|
|
float | getKd2 () |
| PyHelios getter to obtain third diffuse component. More...
|
|
void | setKd2 (double kd2) |
| PyHelios setter to set third diffuse component. More...
|
|
float | getKd3 () |
| PyHelios getter to obtain fourth diffuse component. More...
|
|
void | setKd3 (double kd3) |
| PyHelios setter to set fourth diffuse component. More...
|
|
float | getKs0 () |
| PyHelios getter to obtain first specular component. More...
|
|
void | setKs0 (double ks0) |
| PyHelios setter to set first specular component. More...
|
|
float | getKs1 () |
| PyHelios getter to obtain second specular component. More...
|
|
void | setKs1 (double ks1) |
| PyHelios setter to set second specular component. More...
|
|
float | getKs2 () |
| PyHelios getter to get third specular component. More...
|
|
void | setKs2 (double ks2) |
| PyHelios setter to set third specular component. More...
|
|
float | getKs3 () |
| PyHelios getter to get fourth specular component. More...
|
|
void | setKs3 (double ks3) |
| PyHelios setter to set fourth specular component. More...
|
|
|
std::string | name = "default" |
| Material name.
|
|
bool | isGround = true |
| Flag specifying if material is ground (true) or not (false)
|
|
bool | useVertexColors = false |
| Flag specifying if use vertex colors (true) or not (false). Color usage is at the moment excluded from Helios++, so this attribute might be discarded in the future.
|
|
std::string | matFilePath |
| Path to the file containing material definition.
|
|
std::string | map_Kd = "" |
| This attribute is currently not being used and might be discarded in the future.
|
|
double | reflectance = 0 |
| Material reflectance.
|
|
double | specularity = 0 |
| Material specularity. More...
|
|
double | specularExponent = 10 |
| Material specular exponent.
|
|
int | classification = 0 |
| Material classification. More...
|
|
std::string | spectra = "" |
| Material spectra, used to find material reflectance when using spectral library. More...
|
|
float | ka [4] = { 0, 0, 0, 0 } |
| Material ambient components.
|
|
float | kd [4] = { 0, 0, 0, 0 } |
| Material diffuse components.
|
|
float | ks [4] = { 0, 0, 0, 0 } |
| Material specular components.
|
|
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
|
class | boost::serialization::access |
|
Class representing a material specification.
◆ getKa0()
float Material::getKa0 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain first ambient component.
- Returns
- First ambient component
◆ getKa1()
float Material::getKa1 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain second ambient component.
- Returns
- Second ambient component
◆ getKa2()
float Material::getKa2 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain third ambient component.
- Returns
- Third ambient component
◆ getKa3()
float Material::getKa3 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain fourth ambient component.
- Returns
- Fourth ambient component
◆ getKd()
float * Material::getKd |
( |
float |
factor | ) |
|
Obtain specular component.
- Parameters
-
factor | Factor to be applied to diffuse components before returning |
- Returns
- 3D float array containing the diffuse components. NOTICE it must be released once it is no longer necessary
float *diffuse =
getKd(1.0);
...
delete[] diffuse
◆ getKd0()
float Material::getKd0 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain first diffuse component.
- Returns
- First diffuse component
◆ getKd1()
float Material::getKd1 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain second diffuse component.
- Returns
- Second diffuse component
◆ getKd2()
float Material::getKd2 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain third diffuse component.
- Returns
- Third diffuse component
◆ getKd3()
float Material::getKd3 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain fourth diffuse component.
- Returns
- Fourth diffuse component
◆ getKs0()
float Material::getKs0 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain first specular component.
- Returns
- First specular component
◆ getKs1()
float Material::getKs1 |
( |
| ) |
|
|
inline |
PyHelios getter to obtain second specular component.
- Returns
- Second specular component
◆ getKs2()
float Material::getKs2 |
( |
| ) |
|
|
inline |
PyHelios getter to get third specular component.
- Returns
- Third specular component
◆ getKs3()
float Material::getKs3 |
( |
| ) |
|
|
inline |
PyHelios getter to get fourth specular component.
- Returns
- Fourth specular component
◆ setKa0()
void Material::setKa0 |
( |
double |
ka0 | ) |
|
|
inline |
PyHelios setter to set first ambient component.
- Parameters
-
ka0 | New first ambient component |
◆ setKa1()
void Material::setKa1 |
( |
double |
ka1 | ) |
|
|
inline |
PyHelios setter to set second ambient component.
- Parameters
-
ka1 | New second ambient component |
◆ setKa2()
void Material::setKa2 |
( |
double |
ka2 | ) |
|
|
inline |
PyHelios setter to obtain third ambient component.
- Parameters
-
ka2 | New third ambient component |
◆ setKa3()
void Material::setKa3 |
( |
double |
ka3 | ) |
|
|
inline |
PyHelios setter to set fourth ambient component.
- Parameters
-
ka3 | New fourth ambient component |
◆ setKd0()
void Material::setKd0 |
( |
double |
kd0 | ) |
|
|
inline |
PyHelios setter to set first diffuse component.
- Parameters
-
kd0 | New first diffuse component |
◆ setKd1()
void Material::setKd1 |
( |
double |
kd1 | ) |
|
|
inline |
PyHelios setter to obtain second diffuse component.
- Parameters
-
kd1 | Second diffuse component |
◆ setKd2()
void Material::setKd2 |
( |
double |
kd2 | ) |
|
|
inline |
PyHelios setter to set third diffuse component.
- Parameters
-
kd2 | New third diffuse component |
◆ setKd3()
void Material::setKd3 |
( |
double |
kd3 | ) |
|
|
inline |
PyHelios setter to set fourth diffuse component.
- Parameters
-
kd3 | New fourth diffuse component |
◆ setKs0()
void Material::setKs0 |
( |
double |
ks0 | ) |
|
|
inline |
PyHelios setter to set first specular component.
- Parameters
-
ks0 | New first specular component |
◆ setKs1()
void Material::setKs1 |
( |
double |
ks1 | ) |
|
|
inline |
PyHelios setter to set second specular component.
- Parameters
-
ks1 | New second specular component |
◆ setKs2()
void Material::setKs2 |
( |
double |
ks2 | ) |
|
|
inline |
PyHelios setter to set third specular component.
- Parameters
-
ks2 | New third specular component |
◆ setKs3()
void Material::setKs3 |
( |
double |
ks3 | ) |
|
|
inline |
PyHelios setter to set fourth specular component.
- Parameters
-
ks3 | New fourth specular component |
◆ setSpecularity()
void Material::setSpecularity |
( |
| ) |
|
Compute the specularity \(s\).
Let \(Kd\) represent the diffuse components and \(Ks\) represent the specular components
\[ s = \frac{\sum_{i=1}^{3}{Ks_{i}}} {\sum_{i=1}^{3}{Kd_{i}} + \sum_{i=1}^{3}{Ks_{i}}} \]
- See also
- Material::specularity
◆ classification
int Material::classification = 0 |
◆ spectra
std::string Material::spectra = "" |
◆ specularity
double Material::specularity = 0 |
The documentation for this class was generated from the following files: