#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 () | |
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 |
Material class.
App::Material::Material | ( | ) |
Sets the USER_DEFINED material type.
The user must set the colors afterwards.
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.
App::Material::Material | ( | const MaterialType | MatType | ) |
Does basically the same as the constructor above unless that it accepts a MaterialType as argument.
App::Material::~Material | ( | ) |
MaterialType App::Material::getType | ( | ) | const |
Returns the currently set material type.
Referenced by PathScripts.PathToolEdit.ToolEditor::updateToolType(), and PathScripts.PathToolEdit.ToolEditor::updateUI().
void App::Material::set | ( | const char * | MatName | ) |
Set a material by name There are some standard materials defined which are:
Referenced by draftguitools.gui_trackers.editTracker::move().
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.
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(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
Color App::Material::diffuseColor |
Defines the diffuse color.
Referenced by Gui::ViewProviderLink::getElementColors(), Gui::Dialog::DlgMaterialPropertiesImp::on_diffuseColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMesh::onChanged(), MeshGui::ViewProviderMeshNode::onChanged(), PartGui::ViewProviderPartExt::onChanged(), 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().
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(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
float App::Material::shininess |
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_shininess_valueChanged(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
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(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
float App::Material::transparency |
Referenced by Gui::ViewProviderLink::getElementColors(), Gui::ViewProviderGeometryObject::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartExt::onChanged(), Gui::LinkView::setMaterial(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), PartGui::ViewProviderPartReference::ViewProviderPartReference(), and automotive_design.surface_style_transparent::wr1().