App::Color Class Reference

Color class. More...

#include <Material.h>

List of all members.

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
Coloroperator= (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].
ColorsetPackedValue (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

Detailed Description

Color class.

Definition at line 36 of file Material.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

uint32_t App::Color::getPackedValue (  )  const [inline]
bool App::Color::operator!= ( const Color c  )  const [inline]

Definition at line 60 of file Material.h.

References Py::operator==().

Color& App::Color::operator= ( const Color c  )  [inline]

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.

See also:
getPackedValue().

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().


Member Data Documentation

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().

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().

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().


The documentation for this class was generated from the following file:

Generated on Wed Nov 23 19:01:42 2011 for FreeCAD by  doxygen 1.6.1