Description
Definition of a visual material.
#include <ChVisualMaterial.h>
Public Member Functions | |
| void | SetAmbientColor (const ChColor &rgb) |
| void | SetDiffuseColor (const ChColor &rgb) |
| void | SetSpecularColor (const ChColor &rgb) |
| void | SetEmissiveColor (const ChColor &rgb) |
| void | SetEmissivePower (const float &power) |
| void | SetSpecularExponent (float exponent) |
| void | SetOpacity (float o) |
| void | SetIllumination (int i) |
| void | SetKdTexture (const std::string &filename) |
| void | SetKsTexture (const std::string &filename) |
| void | SetKeTexture (const std::string &filename) |
| void | SetNormalMapTexture (const std::string &filename) |
| void | SetMetallicTexture (const std::string &filename) |
| void | SetRoughnessTexture (const std::string &filename) |
| void | SetOpacityTexture (const std::string &filename) |
| void | SetWeightTexture (const std::string &filename) |
| void | SetDisplacementTexture (const std::string &filename) |
| void | SetAmbientOcclusionTexture (const std::string &filename) |
| void | SetTextureScale (float scale_x, float scale_y) |
| Apply the specified texture scaling to all textures in this material. | |
| void | SetFresnelExp (float exp) |
| void | SetFresnelMax (float max) |
| void | SetFresnelMin (float min) |
| void | SetRoughness (float r) |
| void | SetMetallic (float m) |
| void | SetAnisotropy (float a) |
| void | SetUseSpecularWorkflow (bool s) |
| void | SetBSDF (BSDFType s) |
| Set the BSDF type of the material to be used for rendering. | |
| void | SetClassID (unsigned short int id) |
| void | SetInstanceID (unsigned short int id) |
| void | SetHapkeParameters (float w, float b, float c, float B_s0, float h_s, float phi, float theta_p) |
| Set the Hapke material parameters. More... | |
| const ChColor & | GetAmbientColor () const |
| const ChColor & | GetDiffuseColor () const |
| const ChColor & | GetSpecularColor () const |
| const ChColor & | GetEmissiveColor () const |
| const float & | GetEmissivePower () const |
| float | GetSpecularExponent () const |
| float | GetOpacity () const |
| int | GetIllumination () const |
| const std::string & | GetKdTexture () const |
| const std::string & | GetKsTexture () const |
| const std::string & | GetKeTexture () const |
| const std::string & | GetNormalMapTexture () const |
| const std::string & | GetMetallicTexture () const |
| const std::string & | GetRoughnessTexture () const |
| const std::string & | GetOpacityTexture () const |
| const std::string & | GetWeightTexture () const |
| const std::string & | GetDisplacementTexture () const |
| const std::string & | GetAmbientOcclusionTexture () const |
| const ChVector2f & | GetTextureScale () const |
| float | GetFresnelExp () const |
| float | GetFresnelMax () const |
| float | GetFresnelMin () const |
| float | GetRoughness () const |
| float | GetMetallic () const |
| float | GetAnisotropy () const |
| bool | GetUseSpecularWorkflow () const |
| bool | GetUseHapke () const |
| float | GetHapkeW () const |
| float | GetHapkeB () const |
| float | GetHapkeC () const |
| float | GetHapkeBs0 () const |
| float | GetHapkeHs () const |
| float | GetHapkePhi () const |
| float | GetHapkeRoughness () const |
| BSDFType | GetBSDF () const |
| Get the BSDF type of the material. | |
| unsigned short int | GetClassID () const |
| unsigned short int | GetInstanceID () const |
| virtual void | ArchiveOut (ChArchiveOut &archive_out) |
| Method to allow serialization of transient data to archives. | |
| virtual void | ArchiveIn (ChArchiveIn &archive_in) |
| Method to allow de-serialization of transient data from archives. | |
Static Public Member Functions | |
| static std::shared_ptr< ChVisualMaterial > | Default () |
| Create a default material. More... | |
Member Function Documentation
◆ Default()
|
static |
Create a default material.
This is the shared material that describes a visual shape carrying no material of its own. It is what ChVisualShape::GetColor() reports for an empty material list, and what all run-time visualization systems use for such a shape. Every call returns the same object.
Do not mutate what this returns. The pointer is non-const only because attaching a material to a shape takes a non-const shared_ptr; a setter called on this object would change the appearance of every material-less shape in every scene. ChVisualShape's own setters copy it before writing for exactly that reason (see ChVisualShape::SetColor). Chrono::Sensor copies the values into a device-side material pool when it builds its scene, which happens on the first sensor update and not again, so a mutation after that point would additionally make the CPU-side and GPU-side pictures disagree.
◆ SetHapkeParameters()
| void chrono::ChVisualMaterial::SetHapkeParameters | ( | float | w, |
| float | b, | ||
| float | c, | ||
| float | B_s0, | ||
| float | h_s, | ||
| float | phi, | ||
| float | theta_p | ||
| ) |
Set the Hapke material parameters.
Note that this implementation ignores the impact of coherent back-scatter.
- Parameters
-
w single scattering albedo b shape controlling parameter for the amplitude of backward and forward scatter of particles c weighting factor that controls the contribution of backward and forward scatter B_s0 amplitude of the opposition effect caused by shadow hiding h_s angular width of the opposition effect caused by shadow hiding phi filling factor theta_p effective value of the photometric roughness
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono/assets/ChVisualMaterial.h
- /builds/uwsbel/chrono/src/chrono/assets/ChVisualMaterial.cpp