|
Open3D (C++ API)
0.19.0
|
#include <Material.h>
Public Types | |
| using | TextureMaps = std::unordered_map< std::string, t::geometry::Image > |
| using | ScalarPropertyMap = std::unordered_map< std::string, float > |
| using | VectorPropertyMap = std::unordered_map< std::string, Eigen::Vector4f, std::hash< std::string >, std::equal_to< std::string >, Eigen::aligned_allocator< std::pair< const std::string, Eigen::Vector4f > >> |
Public Member Functions | |
| Material ()=default | |
| Create an empty, invalid material. More... | |
| Material (const Material &mat)=default | |
| Material & | operator= (const Material &other)=default |
| Material (const std::string &material_name) | |
| Create an empty but valid material for the specified material name. More... | |
| void | SetDefaultProperties () |
| bool | IsValid () const |
| const std::string & | GetMaterialName () const |
| Get the name of the material. More... | |
| std::string | ToString () const |
| String reprentation for printing. More... | |
| const TextureMaps & | GetTextureMaps () const |
| Returns the texture map map. More... | |
| const t::geometry::Image & | GetTextureMap (const std::string &key) const |
| const ScalarPropertyMap & | GetScalarProperties () const |
| Returns the map of scalar properties. More... | |
| float | GetScalarProperty (const std::string &key) const |
| const VectorPropertyMap & | GetVectorProperties () const |
| Returns the map of vector properties. More... | |
| Eigen::Vector4f | GetVectorProperty (const std::string &key) const |
| void | SetTextureMap (const std::string &key, const t::geometry::Image &image) |
| void | SetScalarProperty (const std::string &key, float value) |
| void | SetVectorProperty (const std::string &key, const Eigen::Vector4f &value) |
| void | SetMaterialName (const std::string &material_name) |
| Set material name. The material name should match the name of a built. More... | |
| bool | HasTextureMap (const std::string &key) const |
| bool | HasScalarProperty (const std::string &key) const |
| bool | HasVectorProperty (const std::string &key) const |
| const t::geometry::Image & | GetAlbedoMap () const |
| const t::geometry::Image & | GetNormalMap () const |
| const t::geometry::Image & | GetAOMap () const |
| const t::geometry::Image & | GetMetallicMap () const |
| const t::geometry::Image & | GetRoughnessMap () const |
| const t::geometry::Image & | GetReflectanceMap () const |
| const t::geometry::Image & | GetClearcoatMap () const |
| const t::geometry::Image & | GetClearcoatRoughnessMap () const |
| const t::geometry::Image & | GetAnisotropyMap () const |
| const t::geometry::Image & | GetAORoughnessMetalMap () const |
| bool | HasAlbedoMap () const |
| bool | HasNormalMap () const |
| bool | HasAOMap () const |
| bool | HasMetallicMap () const |
| bool | HasRoughnessMap () const |
| bool | HasReflectanceMap () const |
| bool | HasClearcoatMap () const |
| bool | HasClearcoatRoughnessMap () const |
| bool | HasAnisotropyMap () const |
| bool | HasAORoughnessMetalMap () const |
| void | SetAlbedoMap (const t::geometry::Image &image) |
| void | SetNormalMap (const t::geometry::Image &image) |
| void | SetAOMap (const t::geometry::Image &image) |
| void | SetMetallicMap (const t::geometry::Image &image) |
| void | SetRoughnessMap (const t::geometry::Image &image) |
| void | SetReflectanceMap (const t::geometry::Image &image) |
| void | SetClearcoatMap (const t::geometry::Image &image) |
| void | SetClearcoatRoughnessMap (const t::geometry::Image &image) |
| void | SetAnisotropyMap (const t::geometry::Image &image) |
| void | SetAORoughnessMetalMap (const t::geometry::Image &image) |
| Eigen::Vector4f | GetBaseColor () const |
| float | GetBaseMetallic () const |
| float | GetBaseRoughness () const |
| float | GetBaseReflectance () const |
| float | GetBaseClearcoat () const |
| float | GetBaseClearcoatRoughness () const |
| float | GetAnisotropy () const |
| float | GetThickness () const |
| float | GetTransmission () const |
| Eigen::Vector4f | GetAbsorptionColor () const |
| float | GetAbsorptionDistance () const |
| Eigen::Vector4f | GetEmissiveColor () const |
| bool | HasBaseColor () const |
| bool | HasBaseMetallic () const |
| bool | HasBaseRoughness () const |
| bool | HasBaseReflectance () const |
| bool | HasBaseClearcoat () const |
| bool | HasBaseClearcoatRoughness () const |
| bool | HasAnisotropy () const |
| bool | HasThickness () const |
| bool | HasTransmission () const |
| bool | HasAbsorptionColor () const |
| bool | HasAbsorptionDistance () const |
| bool | HasEmissiveColor () const |
| void | SetBaseColor (const Eigen::Vector4f &value) |
| void | SetBaseMetallic (float value) |
| void | SetBaseRoughness (float value) |
| void | SetBaseReflectance (float value) |
| void | SetBaseClearcoat (float value) |
| void | SetBaseClearcoatRoughness (float value) |
| void | SetAnisotropy (float value) |
| void | SetThickness (float value) |
| void | SetTransmission (float value) |
| void | SetAbsorptionColor (const Eigen::Vector4f &value) |
| void | SetAbsorptionDistance (float value) |
| void | SetEmissiveColor (const Eigen::Vector4f &value) |
| float | GetPointSize () const |
| float | GetLineWidth () const |
| bool | HasPointSize () const |
| bool | HasLineWidth () const |
| void | SetPointSize (float value) |
| void | SetLineWidth (float value) |
| void | ToMaterialRecord (MaterialRecord &record) const |
| Fills a legacy MaterialRecord constructed from this Material. More... | |
Static Public Member Functions | |
| static Material | FromMaterialRecord (const MaterialRecord &mat) |
| Convert from MaterialRecord. More... | |
| using open3d::visualization::rendering::Material::ScalarPropertyMap = std::unordered_map<std::string, float> |
| using open3d::visualization::rendering::Material::TextureMaps = std::unordered_map<std::string, t::geometry::Image> |
| using open3d::visualization::rendering::Material::VectorPropertyMap = std::unordered_map< std::string, Eigen::Vector4f, std::hash<std::string>, std::equal_to<std::string>, Eigen::aligned_allocator< std::pair<const std::string, Eigen::Vector4f> >> |
|
default |
Create an empty, invalid material.
|
default |
|
inline |
Create an empty but valid material for the specified material name.
|
static |
Convert from MaterialRecord.
|
inline |
|
inline |
|
inline |
The following are convenience methods for common PBR material properties
|
inline |
|
inline |
|
inline |
|
inline |
Ambient occlusion, roughness, and metallic maps in a single 3 channel texture. Commonly used in glTF models.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the name of the material.
|
inline |
|
inline |
|
inline |
The following are convenience methods for Pointclouds and LineSet shaders
|
inline |
|
inline |
|
inline |
Returns the map of scalar properties.
|
inline |
Get scalar properties of this Material. Throws exception if the property does not exist.
| key | Property name |
|
inline |
Get images (texture maps) of this Material. Throws exception if the image does not exist.
| key | Map name |
|
inline |
Returns the texture map map.
|
inline |
|
inline |
|
inline |
Returns the map of vector properties.
|
inline |
Get vector properties of this Material. Throws exception if the property does not exist.
| key | Property name |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return true if the property exists
| key | Property name |
|
inline |
Return true if the map exists
| key | Map name |
|
inline |
|
inline |
|
inline |
Return true if the property exists
| key | Property name |
|
inline |
Returns true if the Material was not created with the default constructor and therefore has a valid shader name.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void open3d::visualization::rendering::Material::SetDefaultProperties | ( | ) |
Sets a number of properties to the defaults expected by Open3D shaders
|
inline |
|
inline |
|
inline |
Set material name. The material name should match the name of a built.
| shader | The name of the shader. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set scalar property. If property already exists it is overwritten, otherwise a new key/value will be created.
| key | property name |
| value | Value to assign to property name |
| void open3d::visualization::rendering::Material::SetTextureMap | ( | const std::string & | key, |
| const t::geometry::Image & | image | ||
| ) |
Set texture map. If map already exists it is overwritten, otherwise a new key/image will be created.
| key | map name |
| image | Image associated with map name |
|
inline |
|
inline |
|
inline |
Set vector property. If property already exists it is overwritten, otherwise a new key/value will be created.
| key | property name |
| value | Value to assign to property name |
| void open3d::visualization::rendering::Material::ToMaterialRecord | ( | MaterialRecord & | record | ) | const |
Fills a legacy MaterialRecord constructed from this Material.
| std::string open3d::visualization::rendering::Material::ToString | ( | ) | const |
String reprentation for printing.