#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 | |
MaterialType | getType () const |
Returns the currently set material type. | |
void | set (const char *MatName) |
Set a material by name There are some standard materials defined which are:. | |
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. | |
~Material () | |
Constructors | |
Material (const MaterialType MatType) | |
Does basically the same as the constructor above unless that it accepts a MaterialType as argument. | |
Material (const char *MatName) | |
Defines the colors and shininess for the material MatName. | |
Material (void) | |
Sets the USER_DEFINED material type. | |
Public Attributes | |
Properties | |
Color | ambientColor |
Defines the ambient color. | |
Color | diffuseColor |
Defines the diffuse color. | |
Color | emissiveColor |
Defines the emissive color. | |
float | shininess |
Color | specularColor |
Defines the specular color. | |
float | transparency |
Material class.
Definition at line 111 of file Material.h.
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 |
Definition at line 114 of file Material.h.
Material::Material | ( | void | ) |
Sets the USER_DEFINED material type.
The user must set the colors afterwards.
Definition at line 39 of file Material.cpp.
References setType(), STEEL, and USER_DEFINED.
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.
Definition at line 45 of file Material.cpp.
Material::Material | ( | const MaterialType | MatType | ) |
Does basically the same as the constructor above unless that it accepts a MaterialType as argument.
Definition at line 50 of file Material.cpp.
References setType().
Material::~Material | ( | ) |
Definition at line 55 of file Material.cpp.
MaterialType App::Material::getType | ( | void | ) | const [inline] |
Returns the currently set material type.
Definition at line 192 of file Material.h.
void Material::set | ( | const char * | MatName | ) |
Set a material by name There are some standard materials defined which are:.
Definition at line 59 of file Material.cpp.
References ALUMINIUM, BRASS, BRONZE, CHROME, COPPER, DEFAULT, EMERALD, GOLD, JADE, METALIZED, NEON_GNC, NEON_PHC, OBSIDIAN, PEWTER, PLASTER, PLASTIC, RUBY, SATIN, setType(), SHINY_PLASTIC, SILVER, STEEL, STONE, and USER_DEFINED.
Referenced by App::MaterialPy::set().
void 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.
Definition at line 152 of file Material.cpp.
References ALUMINIUM, ambientColor, BRASS, BRONZE, CHROME, COPPER, diffuseColor, EMERALD, emissiveColor, SketcherExample::f, GOLD, JADE, METALIZED, NEON_GNC, NEON_PHC, OBSIDIAN, PEWTER, PLASTER, PLASTIC, RUBY, SATIN, App::Color::set(), shininess, SHINY_PLASTIC, SILVER, specularColor, STEEL, STONE, transparency, and USER_DEFINED.
Referenced by Material(), and set().
Defines the ambient color.
Definition at line 197 of file Material.h.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_ambientColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartBase::onChanged(), App::PropertyMaterial::Restore(), App::PropertyMaterial::Save(), App::PropertyMaterial::setAmbientColor(), App::MaterialPy::setAmbientColor(), setType(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), FemGui::ViewProviderFemMesh::ViewProviderFemMesh(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartBase::ViewProviderPartBase(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
Defines the diffuse color.
Definition at line 198 of file Material.h.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_diffuseColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), PartGui::ViewProviderPartBase::onChanged(), App::PropertyMaterial::Restore(), App::PropertyMaterial::Save(), MeshVRML::Save(), App::PropertyMaterial::setDiffuseColor(), App::MaterialPy::setDiffuseColor(), setType(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), FemGui::ViewProviderFemMesh::ViewProviderFemMesh(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartBase::ViewProviderPartBase(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
Defines the emissive color.
Definition at line 200 of file Material.h.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_emissiveColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartBase::onChanged(), App::PropertyMaterial::Restore(), App::PropertyMaterial::Save(), MeshVRML::Save(), App::MaterialPy::setEmissiveColor(), App::PropertyMaterial::setEmmisiveColor(), setType(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), FemGui::ViewProviderFemMesh::ViewProviderFemMesh(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartBase::ViewProviderPartBase(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
float App::Material::shininess |
Definition at line 201 of file Material.h.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_shininess_valueChanged(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartBase::onChanged(), App::PropertyMaterial::Restore(), App::PropertyMaterial::Save(), MeshVRML::Save(), App::PropertyMaterial::setShininess(), App::MaterialPy::setShininess(), setType(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), FemGui::ViewProviderFemMesh::ViewProviderFemMesh(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartBase::ViewProviderPartBase(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
Defines the specular color.
Definition at line 199 of file Material.h.
Referenced by Gui::Dialog::DlgMaterialPropertiesImp::on_specularColor_changed(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartBase::onChanged(), App::PropertyMaterial::Restore(), App::PropertyMaterial::Save(), MeshVRML::Save(), App::PropertyMaterial::setSpecularColor(), App::MaterialPy::setSpecularColor(), setType(), Gui::Dialog::DlgMaterialPropertiesImp::setViewProviders(), FemGui::ViewProviderFemMesh::ViewProviderFemMesh(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartBase::ViewProviderPartBase(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().
Definition at line 202 of file Material.h.
Referenced by Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), MeshGui::ViewProviderMeshCurvature::onChanged(), PartGui::ViewProviderPartBase::onChanged(), App::PropertyMaterial::Restore(), App::PropertyMaterial::Save(), MeshVRML::Save(), App::PropertyMaterial::setTransparency(), App::MaterialPy::setTransparency(), setType(), FemGui::ViewProviderFemMesh::ViewProviderFemMesh(), MeshGui::ViewProviderMeshCurvature::ViewProviderMeshCurvature(), PartGui::ViewProviderPartBase::ViewProviderPartBase(), PartGui::ViewProviderPartExt::ViewProviderPartExt(), and PartGui::ViewProviderPartReference::ViewProviderPartReference().