Tesseract
Motion Planning Environment
|
Represents material information extracted from a mesh file. More...
#include <mesh_material.h>
Public Types | |
using | Ptr = std::shared_ptr< MeshMaterial > |
using | ConstPtr = std::shared_ptr< const MeshMaterial > |
Public Member Functions | |
MeshMaterial (Eigen::Vector4d baseColorFactor, double metallicFactor, double roughnessFactor, Eigen::Vector4d emissiveFactor) | |
Construct a new MeshMaterial. More... | |
MeshMaterial ()=default | |
Eigen::Vector4d | getBaseColorFactor () const |
Get the base color of the mesh. More... | |
double | getMetallicFactor () const |
Get the Metallic Factor of the mesh (PBR parameter) More... | |
double | getRoughnessFactor () const |
Get the Roughness Factor of the mesh (PBR parameter) More... | |
Eigen::Vector4d | getEmissiveFactor () const |
Get the emissive factor of the mesh. More... | |
Private Attributes | |
Eigen::Vector4d | base_color_factor_ |
double | metallic_factor_ = 0 |
double | roughness_factor_ = 0.5 |
Eigen::Vector4d | emissive_factor_ |
Represents material information extracted from a mesh file.
Mesh files contain material information. The mesh parser will extract the material information and store it in a MeshMaterial instance. The MeshMaterial class uses a subset PBR Metallic workflow, as specified in the glTF 2.0 file format standard. The four parameters supported are baseColorFactor, metallicFactor, roughnessFactor, and emmisiveFactor. (The MeshTexture class stores diffuse textures that can be used for decals and fiducial marks, and is stored separately from MeshMaterial.) These four parameters and MeshTexture should be enough to display "CAD quality" renderings in visualizers. The full mesh file should be used when higher quality rendering is required.
The MeshMaterial favors PBR materials extracted from glTF 2.0 files. COLLADA does not support PBR. Only "Diffuse" and "Emissive" are read. "Specular" and "Ambient" are ignored.
using tesseract_geometry::MeshMaterial::ConstPtr = std::shared_ptr<const MeshMaterial> |
using tesseract_geometry::MeshMaterial::Ptr = std::shared_ptr<MeshMaterial> |
|
inline |
Construct a new MeshMaterial.
baseColorFactor | The base color of the mesh |
metallicFactor | The metallic factor parameter (PBR parameter) |
roughnessFactor | The roughness factor parameter (PBR parameter) |
emissiveFactor | The emissivity of the mesh |
|
default |
|
inline |
Get the base color of the mesh.
|
inline |
Get the emissive factor of the mesh.
"Emissive factor" is used to make the mesh "glow". How this is interpreted depends on the rendering engine.
|
inline |
Get the Metallic Factor of the mesh (PBR parameter)
|
inline |
Get the Roughness Factor of the mesh (PBR parameter)
|
private |
|
private |
|
private |
|
private |