#include <Material.h>
Public Types | |
enum | MaterialType { BRASS, BRONZE, COPPER, GOLD, PEWTER, PLASTER, PLASTIC, SILVER, STEEL, STONE, SHINY_PLASTIC, SATIN, METALIZED, NEON_GNC, CHROME, ALUMINIUM, OBSIDIAN, NEON_PHC, JADE, RUBY, EMERALD, DEFAULT, USER_DEFINED } |
Public Member Functions | |
Constructors | |
Material (void) | |
Sets the USER_DEFINED material type. More... | |
Material (const char *MatName) | |
Defines the colors and shininess for the material MatName. More... | |
Material (const MaterialType MatType) | |
Does basically the same as the constructor above unless that it accepts a MaterialType as argument. More... | |
~Material () | |
void | set (const char *MatName) |
Set a material by name There are some standard materials defined which are: More... | |
void | setType (const MaterialType MatType) |
This method is provided for convenience which does basically the same as the method above unless that it accepts a MaterialType as argument. More... | |
MaterialType | getType () const |
Returns the currently set material type. More... | |
Properties | |
Color | ambientColor |
Defines the ambient color. More... | |
Color | diffuseColor |
Defines the diffuse color. More... | |
Color | specularColor |
Defines the specular color. More... | |
Color | emissiveColor |
Defines the emissive color. More... | |
float | shininess |
float | transparency |
bool | operator== (const Material &m) const |
bool | operator!= (const Material &m) const |
Detailed Description
Material class.
Member Enumeration Documentation
◆ MaterialType
Constructor & Destructor Documentation
◆ Material() [1/3]
App::Material::Material | ( | void | ) |
Sets the USER_DEFINED material type.
The user must set the colors afterwards.
◆ Material() [2/3]
App::Material::Material | ( | const char * | MatName | ) |
Defines the colors and shininess for the material MatName.
If MatName isn't defined then USER_DEFINED is set and the user must define the colors itself.
◆ Material() [3/3]
App::Material::Material | ( | const MaterialType | MatType | ) |
Does basically the same as the constructor above unless that it accepts a MaterialType as argument.
◆ ~Material()
App::Material::~Material | ( | ) |
Member Function Documentation
◆ getType()
MaterialType App::Material::getType | ( | ) | const |
Returns the currently set material type.
Referenced by PathScripts.PathToolEdit.ToolEditor::updateToolType(), and PathScripts.PathToolEdit.ToolEditor::updateUI().
◆ operator!=()
◆ operator==()
◆ set()
void App::Material::set | ( | const char * | MatName | ) |
Set a material by name There are some standard materials defined which are:
- Brass
- Bronze
- Copper
- Gold
- Pewter
- Plaster
- Plastic
- Silver
- Steel
- Stone
- Shiny plastic
- Satin
- Metalized
- Neon GNC
- Chrome
- Aluminium
- Obsidian
- Neon PHC
- Jade
- Ruby
- Emerald Furthermore there two additional modes Default which defines a kind of grey metallic and user defined that does nothing. The Color and the other properties of the material are defined in the range [0-1]. If MatName is an unknown material name then the type USER_DEFINED is set and the material doesn't get changed.
Referenced by draftguitools.gui_trackers.editTracker::move(), and App::MaterialPy::set().
◆ setType()
void App::Material::setType | ( | const MaterialType | MatType | ) |
This method is provided for convenience which does basically the same as the method above unless that it accepts a MaterialType as argument.
Member Data Documentation
◆ ambientColor
Color App::Material::ambientColor |
Defines the ambient color.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_ambientColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), App::MaterialPy::setAmbientColor(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
◆ diffuseColor
Color App::Material::diffuseColor |
Defines the diffuse color.
Referenced by Gui::ViewProviderLink::getElementColors(), Gui::Dialog::DlgMaterialPropertiesImp::on_diffuseColor_changed(), MeshGui::ViewProviderMeshNode::onChanged(), Gui::ViewProviderGeometryObject::onChanged(), PartGui::ViewProviderPartExt::onChanged(), MeshGui::ViewProviderMesh::onChanged(), App::MaterialPy::setDiffuseColor(), Gui::ViewProviderLink::setElementColors(), Gui::LinkView::setMaterial(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), Gui::PropertyEditor::PropertyMaterialListItem::toolTip(), Gui::ViewProviderLink::ViewProviderLink(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
◆ emissiveColor
Color App::Material::emissiveColor |
Defines the emissive color.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_emissiveColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), App::MaterialPy::setEmissiveColor(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
◆ shininess
float App::Material::shininess |
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_shininess_valueChanged(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), App::MaterialPy::setShininess(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
◆ specularColor
Color App::Material::specularColor |
Defines the specular color.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_specularColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), App::MaterialPy::setSpecularColor(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
◆ transparency
float App::Material::transparency |
Referenced by Gui::ViewProviderLink::getElementColors(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), Gui::LinkView::setMaterial(), App::MaterialPy::setTransparency(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), PartGui::ViewProviderPartReference::ViewProviderPartReference(), and automotive_design.surface_style_transparent::wr1().
The documentation for this class was generated from the following file:
- src/App/Material.h