#include <Material.h>
Public Member Functions | |
Color (const Color &c) | |
Copy constructor. | |
Color (uint32_t rgba) | |
Does basically the same as the constructor above unless that (R,G,B,A) is encoded as an unsigned int. | |
Color (float R=0.0, float G=0.0, float B=0.0, float A=0.0) | |
Defines the color as (R,G,B,A) whereas all values are in the range [0,1]. | |
uint32_t | getPackedValue () const |
Returns color as a 32 bit packed unsigned int in the form 0xRRGGBBAA. | |
bool | operator!= (const Color &c) const |
Color & | operator= (const Color &c) |
bool | operator== (const Color &c) const |
Returns true if both colors are equal. | |
void | set (float R, float G, float B, float A=0.0) |
Defines the color as (R,G,B,A) whereas all values are in the range [0,1]. | |
Color & | setPackedValue (uint32_t rgba) |
Sets the color value as a 32 bit combined red/green/blue/alpha value. | |
Public Attributes | |
float | a |
float | b |
float | g |
float | r |
color values, public accesible |
Color class.
Definition at line 36 of file Material.h.
App::Color::Color | ( | float | R = 0.0 , |
|
float | G = 0.0 , |
|||
float | B = 0.0 , |
|||
float | A = 0.0 | |||
) | [inline, explicit] |
Defines the color as (R,G,B,A) whereas all values are in the range [0,1].
A defines the transparency.
Definition at line 43 of file Material.h.
App::Color::Color | ( | uint32_t | rgba | ) | [inline] |
Does basically the same as the constructor above unless that (R,G,B,A) is encoded as an unsigned int.
Definition at line 49 of file Material.h.
App::Color::Color | ( | const Color & | c | ) | [inline] |
Copy constructor.
Definition at line 52 of file Material.h.
uint32_t App::Color::getPackedValue | ( | ) | const [inline] |
Returns color as a 32 bit packed unsigned int in the form 0xRRGGBBAA.
Definition at line 97 of file Material.h.
References FemExample::b, and SketcherExample::f.
Referenced by App::ColorLegend::getPackedColor(), operator==(), App::PropertyMaterial::Save(), App::PropertyColor::Save(), MeshGui::ViewProviderMesh::ViewProviderMesh(), and MeshGui::ViewProviderMeshNode::ViewProviderMeshNode().
bool App::Color::operator!= | ( | const Color & | c | ) | const [inline] |
Definition at line 60 of file Material.h.
References Py::operator==().
Definition at line 72 of file Material.h.
References a, b, FemExample::b, g, and r.
bool App::Color::operator== | ( | const Color & | c | ) | const [inline] |
Returns true if both colors are equal.
Therefore all components must be equal.
Definition at line 55 of file Material.h.
References getPackedValue().
void App::Color::set | ( | float | R, | |
float | G, | |||
float | B, | |||
float | A = 0.0 | |||
) | [inline] |
Defines the color as (R,G,B,A) whereas all values are in the range [0,1].
A defines the transparency, 0 means complete opaque and 1 invisible.
Definition at line 68 of file Material.h.
References FemExample::b.
Referenced by App::Material::setType(), and App::PropertyColor::setValue().
Color& App::Color::setPackedValue | ( | uint32_t | rgba | ) | [inline] |
Sets the color value as a 32 bit combined red/green/blue/alpha value.
Each component is 8 bit wide (i.e. from 0x00 to 0xff), and the red value should be stored leftmost, like this: 0xRRGGBBAA.
Definition at line 84 of file Material.h.
References SketcherExample::f.
Referenced by App::PropertyMaterial::Restore(), App::PropertyColor::setPyObject(), App::PropertyColor::setValue(), MeshGui::ViewProviderMesh::ViewProviderMesh(), and MeshGui::ViewProviderMeshNode::ViewProviderMeshNode().
float App::Color::a |
Definition at line 106 of file Material.h.
Referenced by App::PropertyColor::getPyObject(), operator=(), App::MaterialPy::setAmbientColor(), App::MaterialPy::setDiffuseColor(), App::MaterialPy::setEmissiveColor(), App::PropertyColor::setPyObject(), and App::MaterialPy::setSpecularColor().
float App::Color::b |
Definition at line 106 of file Material.h.
Referenced by CmdRaytracingWriteView::activated(), App::ColorLegend::addMax(), App::ColorLegend::addMin(), MeshGui::ViewProviderFace::attach(), Gui::PropertyEditor::PropertyColorItem::decoration(), MeshGui::ViewProviderMesh::deselectFacet(), Gui::ViewProviderAnnotationLabel::drawImage(), exporter(), App::ColorField::getColor(), App::PropertyColor::getPyObject(), MeshGui::ViewProviderMesh::highlightSelection(), App::ColorField::interpolate(), Gui::ViewProviderMeasureDistance::onChanged(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), Gui::ViewProviderAnnotationLabel::onChanged(), Gui::ViewProviderAnnotation::onChanged(), PartGui::ViewProviderPartBase::onChanged(), MeshGui::ViewProviderMesh::onChanged(), PartGui::FaceColors::onSelectionChanged(), operator=(), Gui::SoFCColorGradient::rebuildGradient(), MeshVRML::Save(), MeshCore::MeshOutput::SavePLY(), App::MaterialPy::setAmbientColor(), Gui::SoFCColorLegend::setColorModel(), App::MaterialPy::setDiffuseColor(), InspectionGui::ViewProviderInspection::setDistances(), App::MaterialPy::setEmissiveColor(), MeshGui::ViewProviderMeshNode::setOpenEdgeColorFrom(), MeshGui::ViewProviderMesh::setOpenEdgeColorFrom(), App::PropertyColor::setPyObject(), App::MaterialPy::setSpecularColor(), MeshGui::ViewProviderMeshCurvature::setVertexCurvatureMode(), MeshGui::ViewProviderMesh::unhighlightSelection(), and MeshVRML::WriteVRMLAnnotations().
float App::Color::g |
Definition at line 106 of file Material.h.
Referenced by CmdRaytracingWriteView::activated(), App::ColorLegend::addMax(), App::ColorLegend::addMin(), MeshGui::ViewProviderFace::attach(), Gui::PropertyEditor::PropertyColorItem::decoration(), MeshGui::ViewProviderMesh::deselectFacet(), Gui::ViewProviderAnnotationLabel::drawImage(), exporter(), App::ColorField::getColor(), App::PropertyColor::getPyObject(), MeshGui::ViewProviderMesh::highlightSelection(), App::ColorField::interpolate(), Gui::ViewProviderMeasureDistance::onChanged(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), Gui::ViewProviderAnnotationLabel::onChanged(), Gui::ViewProviderAnnotation::onChanged(), PartGui::ViewProviderPartBase::onChanged(), MeshGui::ViewProviderMesh::onChanged(), PartGui::FaceColors::onSelectionChanged(), operator=(), Gui::SoFCColorGradient::rebuildGradient(), MeshVRML::Save(), MeshCore::MeshOutput::SavePLY(), App::MaterialPy::setAmbientColor(), Gui::SoFCColorLegend::setColorModel(), App::MaterialPy::setDiffuseColor(), InspectionGui::ViewProviderInspection::setDistances(), App::MaterialPy::setEmissiveColor(), MeshGui::ViewProviderMeshNode::setOpenEdgeColorFrom(), MeshGui::ViewProviderMesh::setOpenEdgeColorFrom(), App::PropertyColor::setPyObject(), App::MaterialPy::setSpecularColor(), MeshGui::ViewProviderMeshCurvature::setVertexCurvatureMode(), MeshGui::ViewProviderMesh::unhighlightSelection(), and MeshVRML::WriteVRMLAnnotations().
float App::Color::r |
color values, public accesible
Definition at line 106 of file Material.h.
Referenced by CmdRaytracingWriteView::activated(), App::ColorLegend::addMax(), App::ColorLegend::addMin(), MeshGui::ViewProviderFace::attach(), Gui::PropertyEditor::PropertyColorItem::decoration(), MeshGui::ViewProviderMesh::deselectFacet(), Gui::ViewProviderAnnotationLabel::drawImage(), exporter(), App::ColorField::getColor(), App::PropertyColor::getPyObject(), MeshGui::ViewProviderMesh::highlightSelection(), App::ColorField::interpolate(), Gui::ViewProviderMeasureDistance::onChanged(), Gui::ViewProviderGeometryObject::onChanged(), FemGui::ViewProviderFemMesh::onChanged(), PartGui::ViewProviderPartExt::onChanged(), Gui::ViewProviderAnnotationLabel::onChanged(), Gui::ViewProviderAnnotation::onChanged(), PartGui::ViewProviderPartBase::onChanged(), MeshGui::ViewProviderMesh::onChanged(), PartGui::FaceColors::onSelectionChanged(), operator=(), Gui::SoFCColorGradient::rebuildGradient(), MeshVRML::Save(), MeshCore::MeshOutput::SavePLY(), App::MaterialPy::setAmbientColor(), Gui::SoFCColorLegend::setColorModel(), App::MaterialPy::setDiffuseColor(), InspectionGui::ViewProviderInspection::setDistances(), App::MaterialPy::setEmissiveColor(), MeshGui::ViewProviderMeshNode::setOpenEdgeColorFrom(), MeshGui::ViewProviderMesh::setOpenEdgeColorFrom(), App::PropertyColor::setPyObject(), App::MaterialPy::setSpecularColor(), MeshGui::ViewProviderMeshCurvature::setVertexCurvatureMode(), MeshGui::ViewProviderMesh::unhighlightSelection(), and MeshVRML::WriteVRMLAnnotations().