#include <mitkMaterial.h>
Public Types | |
enum | InterpolationType { Flat, Gouraud, Phong } |
enum | RepresentationType { Points, Wireframe, Surface } |
typedef Material | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
typedef itk::RGBPixel < vtkFloatingPointType > | Color |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual bool | Assignable (const Material &other) const |
virtual Material & | operator= (const Material &other) |
virtual void | SetColor (Color color) |
virtual void | SetColor (vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue) |
virtual void | SetColorCoefficient (vtkFloatingPointType coefficient) |
virtual void | SetSpecularColor (Color color) |
virtual void | SetSpecularColor (vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue) |
virtual void | SetSpecularCoefficient (vtkFloatingPointType specularCoefficient) |
virtual void | SetSpecularPower (vtkFloatingPointType specularPower) |
virtual void | SetOpacity (vtkFloatingPointType opacity) |
virtual void | SetInterpolation (InterpolationType interpolation) |
virtual void | SetRepresentation (RepresentationType representation) |
virtual void | SetLineWidth (float lineWidth) |
virtual Color | GetColor () const |
virtual vtkFloatingPointType | GetColorCoefficient () const |
virtual Color | GetSpecularColor () const |
virtual vtkFloatingPointType | GetSpecularCoefficient () const |
virtual vtkFloatingPointType | GetSpecularPower () const |
virtual vtkFloatingPointType | GetOpacity () const |
virtual InterpolationType | GetInterpolation () const |
virtual RepresentationType | GetRepresentation () const |
virtual int | GetVtkInterpolation () const |
virtual int | GetVtkRepresentation () const |
virtual float | GetLineWidth () const |
virtual void | Initialize (const Material &property) |
virtual bool | operator== (const Material &property) const |
void | PrintSelf (std::ostream &os) const |
virtual void | SetName (std::string _arg) |
virtual std::string | GetName () const |
Static Public Member Functions | |
static Pointer | New () |
static Pointer | New (Color color, vtkFloatingPointType opacity=1.0f) |
static Pointer | New (vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType opacity=1.0f) |
static Pointer | New (vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType colorCoefficient, vtkFloatingPointType specularCoefficient, vtkFloatingPointType specularPower, vtkFloatingPointType opacity) |
static Pointer | New (Color color, vtkFloatingPointType colorCoefficient, vtkFloatingPointType specularCoefficient, vtkFloatingPointType specularPower, vtkFloatingPointType opacity) |
static Pointer | New (const Material &_arg) |
static Pointer | New (const Material &property, vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType opacity=1.0, std::string name="") |
Protected Member Functions | |
Material () | |
Material (Color color, vtkFloatingPointType opacity=1.0f) | |
Material (vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType opacity=1.0f) | |
Material (vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType colorCoefficient, vtkFloatingPointType specularCoefficient, vtkFloatingPointType specularPower, vtkFloatingPointType opacity) | |
Material (Color color, vtkFloatingPointType colorCoefficient, vtkFloatingPointType specularCoefficient, vtkFloatingPointType specularPower, vtkFloatingPointType opacity) | |
Material (const Material &property) | |
Material (const Material &property, vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType opacity=1.0, std::string name="") | |
virtual void | InitializeStandardValues () |
virtual void | Update () |
Protected Attributes | |
std::string | m_Name |
Color | m_Color |
Color | m_SpecularColor |
vtkFloatingPointType | m_ColorCoefficient |
vtkFloatingPointType | m_SpecularCoefficient |
vtkFloatingPointType | m_SpecularPower |
vtkFloatingPointType | m_Opacity |
float | m_LineWidth |
InterpolationType | m_Interpolation |
RepresentationType | m_Representation |
Encapsulates 3D visualization properties which are forwarded to vtk for color mapping. This includes color, specular coefficient and power, opacity interpolation type (flat, gouraud, phong) and representation (points, wireframe or surface).
Definition at line 39 of file mitkMaterial.h.
typedef itk::RGBPixel<vtkFloatingPointType> mitk::Material::Color |
Definition at line 42 of file mitkMaterial.h.
typedef itk::SmartPointer<const Self> mitk::Material::ConstPointer |
Definition at line 42 of file mitkMaterial.h.
typedef itk::SmartPointer<Self> mitk::Material::Pointer |
Definition at line 42 of file mitkMaterial.h.
typedef Material mitk::Material::Self |
Definition at line 42 of file mitkMaterial.h.
typedef itk::Object mitk::Material::Superclass |
Definition at line 42 of file mitkMaterial.h.
Definition at line 46 of file mitkMaterial.h.
Definition at line 51 of file mitkMaterial.h.
mitk::Material::Material | ( | ) | [protected] |
Constructor. Materials are set to the following default values: Color (0.5, 0.5, 0.5) color coefficient 1.0, specular color (1.0, 1.0, 1.0), specular coefficient 1.0, specular power 10, opacity 1.0, interpolation Gouraud, representation Surface.
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 94 of file mitkMaterial.cpp.
{ InitializeStandardValues(); SetColor( GetColor() ); SetColorCoefficient( GetColorCoefficient() ); SetSpecularColor( GetSpecularColor() ); SetSpecularCoefficient( GetSpecularCoefficient() ); SetSpecularPower( GetSpecularPower() ); SetOpacity( GetOpacity() ); SetInterpolation( GetInterpolation() ); SetRepresentation( GetRepresentation() ); SetLineWidth( GetLineWidth() ); }
mitk::Material::Material | ( | Color | color, |
vtkFloatingPointType | opacity = 1.0f |
||
) | [protected] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 27 of file mitkMaterial.cpp.
References GetColorCoefficient(), GetInterpolation(), GetLineWidth(), GetRepresentation(), GetSpecularCoefficient(), GetSpecularColor(), GetSpecularPower(), InitializeStandardValues(), m_Name, SetColor(), SetColorCoefficient(), SetInterpolation(), SetLineWidth(), SetOpacity(), SetRepresentation(), SetSpecularCoefficient(), SetSpecularColor(), and SetSpecularPower().
{ InitializeStandardValues(); SetColor( color ); SetColorCoefficient( GetColorCoefficient() ); SetSpecularColor( GetSpecularColor() ); SetSpecularCoefficient( GetSpecularCoefficient() ); SetSpecularPower( GetSpecularPower() ); SetOpacity( opacity ); SetInterpolation( GetInterpolation() ); SetRepresentation( GetRepresentation() ); SetLineWidth( GetLineWidth() ); m_Name = ""; }
mitk::Material::Material | ( | vtkFloatingPointType | red, |
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue, | ||
vtkFloatingPointType | opacity = 1.0f |
||
) | [protected] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 44 of file mitkMaterial.cpp.
{ InitializeStandardValues(); SetColor( red, green, blue ); SetColorCoefficient( GetColorCoefficient() ); SetSpecularColor( GetSpecularColor() ); SetSpecularCoefficient( GetSpecularCoefficient() ); SetSpecularPower( GetSpecularPower() ); SetOpacity( opacity ); SetInterpolation( GetInterpolation() ); SetRepresentation( GetRepresentation() ); SetLineWidth( GetLineWidth() ); m_Name = ""; }
mitk::Material::Material | ( | vtkFloatingPointType | red, |
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue, | ||
vtkFloatingPointType | colorCoefficient, | ||
vtkFloatingPointType | specularCoefficient, | ||
vtkFloatingPointType | specularPower, | ||
vtkFloatingPointType | opacity | ||
) | [protected] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 61 of file mitkMaterial.cpp.
{ InitializeStandardValues(); SetColor( red, green, blue ); SetColorCoefficient( colorCoefficient ); SetSpecularColor( GetSpecularColor() ); SetSpecularCoefficient( specularCoefficient ); SetSpecularPower( specularPower ); SetOpacity( opacity ); SetInterpolation( GetInterpolation() ); SetRepresentation( GetRepresentation() ); SetLineWidth( GetLineWidth() ); m_Name = ""; }
mitk::Material::Material | ( | Color | color, |
vtkFloatingPointType | colorCoefficient, | ||
vtkFloatingPointType | specularCoefficient, | ||
vtkFloatingPointType | specularPower, | ||
vtkFloatingPointType | opacity | ||
) | [protected] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 79 of file mitkMaterial.cpp.
{ InitializeStandardValues(); SetColor( color ); SetColorCoefficient( colorCoefficient ); SetSpecularColor( GetSpecularColor() ); SetSpecularCoefficient( specularCoefficient ); SetSpecularPower( specularPower ); SetOpacity( opacity ); SetInterpolation( GetInterpolation() ); SetRepresentation( GetRepresentation() ); SetLineWidth( GetLineWidth() ); }
mitk::Material::Material | ( | const Material & | property ) | [protected] |
Copy constructor
Definition at line 108 of file mitkMaterial.cpp.
References Initialize().
: itk::Object() { Initialize( property ); }
mitk::Material::Material | ( | const Material & | property, |
vtkFloatingPointType | red, | ||
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue, | ||
vtkFloatingPointType | opacity = 1.0 , |
||
std::string | name = "" |
||
) | [protected] |
Copy constructor, provided for convinience. The values are copied from property and afterwards the values provided for red green blue and opacity are written into the object.
Definition at line 113 of file mitkMaterial.cpp.
{ Initialize( property ); SetColor( red, green, blue ); SetOpacity( opacity ); SetName( name ); }
bool mitk::Material::Assignable | ( | const Material & | other ) | const [virtual] |
Definition at line 121 of file mitkMaterial.cpp.
References GetOpacity().
virtual const char* mitk::Material::GetClassName | ( | ) | const [virtual] |
mitk::Material::Color mitk::Material::GetColor | ( | ) | const [virtual] |
Definition at line 228 of file mitkMaterial.cpp.
Referenced by Initialize(), and operator==().
{ return m_Color; }
vtkFloatingPointType mitk::Material::GetColorCoefficient | ( | ) | const [virtual] |
Definition at line 234 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_ColorCoefficient; }
mitk::Material::InterpolationType mitk::Material::GetInterpolation | ( | ) | const [virtual] |
Definition at line 261 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_Interpolation; }
float mitk::Material::GetLineWidth | ( | ) | const [virtual] |
Definition at line 294 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_LineWidth; }
virtual std::string mitk::Material::GetName | ( | ) | const [virtual] |
returns the name associated with the material property
Referenced by Initialize(), and operator==().
vtkFloatingPointType mitk::Material::GetOpacity | ( | ) | const [virtual] |
Definition at line 256 of file mitkMaterial.cpp.
Referenced by Assignable(), Initialize(), and operator==().
{ return m_Opacity; }
mitk::Material::RepresentationType mitk::Material::GetRepresentation | ( | ) | const [virtual] |
Definition at line 266 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_Representation; }
vtkFloatingPointType mitk::Material::GetSpecularCoefficient | ( | ) | const [virtual] |
Definition at line 244 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_SpecularCoefficient; }
mitk::Material::Color mitk::Material::GetSpecularColor | ( | ) | const [virtual] |
Definition at line 239 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_SpecularColor; }
vtkFloatingPointType mitk::Material::GetSpecularPower | ( | ) | const [virtual] |
Definition at line 250 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
{ return m_SpecularPower; }
int mitk::Material::GetVtkInterpolation | ( | ) | const [virtual] |
Definition at line 272 of file mitkMaterial.cpp.
{ switch ( m_Interpolation ) { case( Flat ) : return VTK_FLAT; case( Gouraud ) : return VTK_GOURAUD; case( Phong ) : return VTK_PHONG; } return VTK_GOURAUD; }
int mitk::Material::GetVtkRepresentation | ( | ) | const [virtual] |
Definition at line 283 of file mitkMaterial.cpp.
{ switch ( m_Representation ) { case( Points ) : return VTK_POINTS; case( Wireframe ) : return VTK_WIREFRAME; case( Surface ) : return VTK_SURFACE; } return VTK_SURFACE; }
void mitk::Material::Initialize | ( | const Material & | property ) | [virtual] |
Fills the current materials with the properties of the given material.
property | the materials which should be copied in the current materials |
copyDataNode | If set to true, the data tree node and renderer associated with the material property are also copied. Otherwise these member variables will be left untouched |
Definition at line 299 of file mitkMaterial.cpp.
References GetColor(), GetColorCoefficient(), GetInterpolation(), GetLineWidth(), GetName(), GetOpacity(), GetRepresentation(), GetSpecularCoefficient(), GetSpecularColor(), and GetSpecularPower().
Referenced by Material().
{ this->SetColor( property.GetColor() ); this->SetColorCoefficient( property.GetColorCoefficient() ); this->SetSpecularColor( property.GetSpecularColor() ); this->SetSpecularCoefficient( property.GetSpecularCoefficient() ); this->SetSpecularPower( property.GetSpecularPower() ); this->SetOpacity( property.GetOpacity() ); this->SetInterpolation( property.GetInterpolation() ); this->SetRepresentation( property.GetRepresentation() ); this->SetLineWidth( property.GetLineWidth() ); this->SetName( property.GetName() ); }
void mitk::Material::InitializeStandardValues | ( | ) | [protected, virtual] |
Definition at line 336 of file mitkMaterial.cpp.
Referenced by Material().
{ m_Color.Set( 0.5, 0.5, 0.0 ); m_ColorCoefficient = 0.5 ; m_SpecularColor.Set( 1.0, 1.0, 1.0 ); m_SpecularCoefficient = 0.5; m_SpecularPower = 10.0; m_Opacity = 1.0 ; m_Interpolation = Gouraud; m_Representation = Surface; m_LineWidth = 1.0; m_Name = ""; }
static Pointer mitk::Material::New | ( | ) | [inline, static] |
Constructor. Materials are set to the following default values: Color (0.5, 0.5, 0.5) color coefficient 1.0, specular color (1.0, 1.0, 1.0), specular coefficient 1.0, specular power 10, opacity 1.0, interpolation Gouraud, representation Surface.
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 65 of file mitkMaterial.h.
Referenced by MaterialTest::testAssignable(), MaterialTest::testConstructor(), MaterialTest::testConstructorColorColorCoefficientSpecularCoefficientSpecularPowerOpacity(), MaterialTest::testConstructorPropertyRedGreenBlueOpacityAndName(), MaterialTest::testConstructorRedGreenBlueColorCoefficientSpecularCoefficientSpecularPowerOpacity(), MaterialTest::testConstructorWithColorOpacity(), MaterialTest::testConstructorWithRedGreenBlueOpacity(), MaterialTest::testInitialize(), MaterialTest::testOperatorAssign(), MaterialTest::testOperatorequality(), MaterialTest::testSetColor(), MaterialTest::testSetColorCoefficient(), MaterialTest::testSetInterpolation(), MaterialTest::testSetLineWidth(), MaterialTest::testSetOpacity(), MaterialTest::testSetRepresentation(), MaterialTest::testSetSpecularCoefficient(), MaterialTest::testSetSpecularColor(), and MaterialTest::testSetSpecularPower().
static Pointer mitk::Material::New | ( | const Material & | property, |
vtkFloatingPointType | red, | ||
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue, | ||
vtkFloatingPointType | opacity = 1.0 , |
||
std::string | name = "" |
||
) | [inline, static] |
Copy constructor, provided for convinience. The values are copied from property and afterwards the values provided for red green blue and opacity are written into the object.
Definition at line 169 of file mitkMaterial.h.
static Pointer mitk::Material::New | ( | vtkFloatingPointType | red, |
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue, | ||
vtkFloatingPointType | opacity = 1.0f |
||
) | [inline, static] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 102 of file mitkMaterial.h.
static Pointer mitk::Material::New | ( | vtkFloatingPointType | red, |
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue, | ||
vtkFloatingPointType | colorCoefficient, | ||
vtkFloatingPointType | specularCoefficient, | ||
vtkFloatingPointType | specularPower, | ||
vtkFloatingPointType | opacity | ||
) | [inline, static] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 127 of file mitkMaterial.h.
static Pointer mitk::Material::New | ( | Color | color, |
vtkFloatingPointType | opacity = 1.0f |
||
) | [inline, static] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 83 of file mitkMaterial.h.
static Pointer mitk::Material::New | ( | Color | color, |
vtkFloatingPointType | colorCoefficient, | ||
vtkFloatingPointType | specularCoefficient, | ||
vtkFloatingPointType | specularPower, | ||
vtkFloatingPointType | opacity | ||
) | [inline, static] |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 153 of file mitkMaterial.h.
Copy constructor
Definition at line 163 of file mitkMaterial.h.
mitk::Material & mitk::Material::operator= | ( | const Material & | other ) | [virtual] |
Definition at line 135 of file mitkMaterial.cpp.
{ try { const Self& otherProp( dynamic_cast<const Self&>(other) ); Initialize(otherProp); } catch (std::bad_cast) { // nothing to do then } return *this; }
bool mitk::Material::operator== | ( | const Material & | property ) | const [virtual] |
comparison operator which uses the member variables for comparison
Definition at line 314 of file mitkMaterial.cpp.
References GetColor(), GetColorCoefficient(), GetInterpolation(), GetLineWidth(), GetName(), GetOpacity(), GetRepresentation(), GetSpecularCoefficient(), GetSpecularColor(), and GetSpecularPower().
{ const Self * other = dynamic_cast<const Self*>( &property ); if ( other == NULL ) return false; else return ( m_Color == other->GetColor() && m_ColorCoefficient == other->GetColorCoefficient() && m_SpecularColor == other->GetSpecularColor() && m_SpecularCoefficient == other->GetSpecularCoefficient() && m_SpecularPower == other->GetSpecularPower() && m_Opacity == other->GetOpacity() && m_Interpolation == other->GetInterpolation() && m_Name == other->GetName() && m_Representation == other->GetRepresentation() && m_LineWidth == other->GetLineWidth() ); }
void mitk::Material::PrintSelf | ( | std::ostream & | os ) | const |
Dumps the properties to the out stream out
Definition at line 362 of file mitkMaterial.cpp.
{ os << "Name: " << GetName() << std::endl; os << "Color: " << GetColor() << std::endl; os << "ColorCoefficient" << GetColorCoefficient() << std::endl; os << "SpecularColor: " << GetSpecularColor() << std::endl; os << "SpecularCoefficient: " << GetSpecularCoefficient() << std::endl; os << "SpecularPower: " << GetSpecularPower() << std::endl; os << "Opacity: " << GetOpacity() << std::endl; os << "Line width: " << GetLineWidth() << std::endl; switch ( GetInterpolation() ) { case ( Flat ) : os << "Interpolation: Flat" << std::endl; break; case ( Gouraud ) : os << "Interpolation: Gouraud" << std::endl; break; case ( Phong ) : os << "Interpolation: Phong" << std::endl; break; } switch ( GetRepresentation() ) { case ( Points ) : os << "Representation: Points" << std::endl; break; case ( Wireframe ) : os << "Representation: Wireframe" << std::endl; break; case ( Surface ) : os << "Representation: Surface" << std::endl; break; } }
void mitk::Material::SetColor | ( | Color | color ) | [virtual] |
Definition at line 153 of file mitkMaterial.cpp.
Referenced by Material().
{ m_Color = color; Modified(); }
void mitk::Material::SetColor | ( | vtkFloatingPointType | red, |
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue | ||
) | [virtual] |
Sets the materials color in RGB space. The rgb components have to be in the range [0..1]
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
Definition at line 160 of file mitkMaterial.cpp.
{ m_Color.Set( red, green, blue ); Modified(); }
void mitk::Material::SetColorCoefficient | ( | vtkFloatingPointType | coefficient ) | [virtual] |
Sets a attenuation coefficient for the color. A value of 0 results in a black object. VAlid range is [0..1]
coefficient | the color attenuation coefficient |
Definition at line 167 of file mitkMaterial.cpp.
Referenced by Material().
{ m_ColorCoefficient = coefficient; Modified(); }
void mitk::Material::SetInterpolation | ( | InterpolationType | interpolation ) | [virtual] |
Sets the surface interpolation method of the object rendered using the given materials. Valid Interopation types are Flat, Gouraud and Phong. See any computer graphics book for their meaning
interpolation | the interpolation method used for rendering of surfaces. |
Definition at line 207 of file mitkMaterial.cpp.
Referenced by Material().
{ m_Interpolation = interpolation; Modified(); }
void mitk::Material::SetLineWidth | ( | float | lineWidth ) | [virtual] |
Set/Get the width of a Line. The width is expressed in screen units. The default is 1.0.
Definition at line 221 of file mitkMaterial.cpp.
Referenced by Material().
{ m_LineWidth = lineWidth; Modified(); }
virtual void mitk::Material::SetName | ( | std::string | _arg ) | [virtual] |
Sets an optional name which may be associated with the material property Please note, that this name is NOT forwarded to the data tree node as the node name
void mitk::Material::SetOpacity | ( | vtkFloatingPointType | opacity ) | [virtual] |
Sets the opacity of the material, which controls how transparent the object appears. Valid range is [0..1], where 0 means fully transparent and 1 means a solid surface.
opacity | the new opacity of the material |
Definition at line 200 of file mitkMaterial.cpp.
Referenced by Material().
{ m_Opacity = opacity; Modified(); }
void mitk::Material::SetRepresentation | ( | RepresentationType | representation ) | [virtual] |
Sets the surface representation method of the object rendered using the given materials. Valid Interopation types are Points, Wireframe and Surface.
representation | the representation method used for rendering of surfaces. |
Definition at line 214 of file mitkMaterial.cpp.
Referenced by Material().
{ m_Representation = representation; Modified(); }
void mitk::Material::SetSpecularCoefficient | ( | vtkFloatingPointType | specularCoefficient ) | [virtual] |
Sets the specular coefficient which controls the shininess of the object together with the specular power
specularCoefficient | the new specular coefficient. Valid range is [0..1] |
Definition at line 186 of file mitkMaterial.cpp.
Referenced by Material().
{ m_SpecularCoefficient = specularCoefficient; Modified(); }
void mitk::Material::SetSpecularColor | ( | Color | color ) | [virtual] |
Sets the specular color
color | the specular color in RGB. Each RGB value should be in the range [0..1] |
Definition at line 173 of file mitkMaterial.cpp.
Referenced by Material().
{ m_SpecularColor = specularColor; Modified(); }
void mitk::Material::SetSpecularColor | ( | vtkFloatingPointType | red, |
vtkFloatingPointType | green, | ||
vtkFloatingPointType | blue | ||
) | [virtual] |
Sets the specular color
red | the red component of the specular color (range [0..1]) |
green | the green component of the specular color (range [0..1]) |
blue | the blue component of the specular color (range [0..1]) |
Definition at line 180 of file mitkMaterial.cpp.
{ m_SpecularColor.Set( red, green, blue ); Modified(); }
void mitk::Material::SetSpecularPower | ( | vtkFloatingPointType | specularPower ) | [virtual] |
Sets the specular power which controls the shininess of the object together with the specular coefficient
specularCoefficient | the new specular coefficient. Valid range is [0..inf] |
Definition at line 193 of file mitkMaterial.cpp.
Referenced by Material().
{ m_SpecularPower = specularPower; Modified(); }
void mitk::Material::Update | ( | ) | [protected, virtual] |
Definition at line 350 of file mitkMaterial.cpp.
{ this->SetColor( this->GetColor() ); this->SetColorCoefficient( this->GetColorCoefficient() ); this->SetSpecularColor( this->GetSpecularColor() ); this->SetSpecularCoefficient( this->GetSpecularCoefficient() ); this->SetSpecularPower( this->GetSpecularPower() ); this->SetOpacity( this->GetOpacity() ); this->SetInterpolation( this->GetInterpolation() ); this->SetRepresentation( this->GetRepresentation() ); }
Color mitk::Material::m_Color [protected] |
Definition at line 454 of file mitkMaterial.h.
vtkFloatingPointType mitk::Material::m_ColorCoefficient [protected] |
Definition at line 458 of file mitkMaterial.h.
InterpolationType mitk::Material::m_Interpolation [protected] |
Definition at line 468 of file mitkMaterial.h.
float mitk::Material::m_LineWidth [protected] |
Definition at line 466 of file mitkMaterial.h.
std::string mitk::Material::m_Name [protected] |
Definition at line 452 of file mitkMaterial.h.
Referenced by Material().
vtkFloatingPointType mitk::Material::m_Opacity [protected] |
Definition at line 464 of file mitkMaterial.h.
RepresentationType mitk::Material::m_Representation [protected] |
Definition at line 470 of file mitkMaterial.h.
vtkFloatingPointType mitk::Material::m_SpecularCoefficient [protected] |
Definition at line 460 of file mitkMaterial.h.
Color mitk::Material::m_SpecularColor [protected] |
Definition at line 456 of file mitkMaterial.h.
vtkFloatingPointType mitk::Material::m_SpecularPower [protected] |
Definition at line 462 of file mitkMaterial.h.