Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

mitk::Material Class Reference

#include <mitkMaterial.h>

List of all members.

Public Types

enum  InterpolationType { Flat, Gouraud, Phong }
enum  RepresentationType { Points, Wireframe, Surface }
typedef Material Self
typedef itk::Object Superclass
typedef itk::SmartPointer< SelfPointer
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 Materialoperator= (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

Detailed Description

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

See also:
vtkProperty

Definition at line 39 of file mitkMaterial.h.


Member Typedef Documentation

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.

Definition at line 42 of file mitkMaterial.h.

typedef itk::Object mitk::Material::Superclass

Definition at line 42 of file mitkMaterial.h.


Member Enumeration Documentation

Enumerator:
Flat 
Gouraud 
Phong 

Definition at line 46 of file mitkMaterial.h.

    {
        Flat, Gouraud, Phong
    };
Enumerator:
Points 
Wireframe 
Surface 

Definition at line 51 of file mitkMaterial.h.


Constructor & Destructor Documentation

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.

Parameters:
nodeoptinally 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.

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

Parameters:
colorthe material color in RGB. Each RGB value should be in the range [0..1]
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptinally 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().

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

Parameters:
redthe red component of the materials color (range [0..1])
greenthe green component of the materials color (range [0..1])
bluethe blue component of the materials color (range [0..1])
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptionally 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.

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

Parameters:
redthe red component of the materials color (range [0..1])
greenthe green component of the materials color (range [0..1])
bluethe blue component of the materials color (range [0..1])
colorCoefficienta scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]).
specularCoefficientcontrols in combination with the specular power how shiny the material will appear (range [0..1]).
specularPowercontrols in combination with the specular coefficient how shiny the material will appear (range [0..inf]).
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptionally 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.

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

Parameters:
colorthe material color in RGB. Each RGB value should be in the range [0..1]
colorCoefficienta scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]).
specularCoefficientcontrols in combination with the specular power how shiny the material will appear (range [0..1]).
specularPowercontrols in combination with the specular coefficient how shiny the material will appear (range [0..inf]).
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptionally 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.

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 );
}

Member Function Documentation

bool mitk::Material::Assignable ( const Material other ) const [virtual]

Definition at line 121 of file mitkMaterial.cpp.

References GetOpacity().

{
  try
  {
    const Material& otherinstance = dynamic_cast<const Self&>(other); // dear compiler, please don't optimize this away! Thanks.
    otherinstance.GetOpacity();
    return true;
  }
  catch (std::bad_cast)
  {
  }
  return false;
}
virtual const char* mitk::Material::GetClassName (  ) const [virtual]
mitk::Material::Color mitk::Material::GetColor (  ) const [virtual]
Returns:
the color of the material

Definition at line 228 of file mitkMaterial.cpp.

Referenced by Initialize(), and operator==().

{
  return m_Color;
}
vtkFloatingPointType mitk::Material::GetColorCoefficient (  ) const [virtual]
Returns:
the color coefficient of the material. Range is [0..1]

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]
Returns:
the interpolation method used for rendering.

Definition at line 261 of file mitkMaterial.cpp.

Referenced by Initialize(), Material(), and operator==().

{
  return m_Interpolation;
}
float mitk::Material::GetLineWidth (  ) const [virtual]
Returns:
the line width used for wireframe rendering as a fraction of screen units

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]
Returns:
the opacity of the material. Ranges from 0 to 1

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]
Returns:
the representation type used for rendering.

Definition at line 266 of file mitkMaterial.cpp.

Referenced by Initialize(), Material(), and operator==().

{
  return m_Representation;
}
vtkFloatingPointType mitk::Material::GetSpecularCoefficient (  ) const [virtual]
Returns:
the specular coefficient used for rendering. Range is [0..1]

Definition at line 244 of file mitkMaterial.cpp.

Referenced by Initialize(), Material(), and operator==().

mitk::Material::Color mitk::Material::GetSpecularColor (  ) const [virtual]
Returns:
the specular color of the material in rgb values, which range from 0 .. 1

Definition at line 239 of file mitkMaterial.cpp.

Referenced by Initialize(), Material(), and operator==().

{
  return m_SpecularColor;
}
vtkFloatingPointType mitk::Material::GetSpecularPower (  ) const [virtual]
Returns:
the specular power. Ranges from 0 to infinity

Definition at line 250 of file mitkMaterial.cpp.

Referenced by Initialize(), Material(), and operator==().

{
  return m_SpecularPower;
}
int mitk::Material::GetVtkInterpolation (  ) const [virtual]
Returns:
the interpolation method used for rendering using the predefined vtk constants.

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]
Returns:
the representation type used for rendering using the predefined vtk constants.

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.

Parameters:
propertythe materials which should be copied in the current materials
copyDataNodeIf 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.

Parameters:
nodeoptinally 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().

    {
      Pointer smartPtr = new Material(  );
      smartPtr->UnRegister();
      return smartPtr;
    }
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.

    {
      Pointer smartPtr = new Material(property, red, green, blue, opacity, name );
      smartPtr->UnRegister();
      return smartPtr;
    }
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

Parameters:
redthe red component of the materials color (range [0..1])
greenthe green component of the materials color (range [0..1])
bluethe blue component of the materials color (range [0..1])
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptionally 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.

    {
      Pointer smartPtr = new Material(red, green, blue, opacity );
      smartPtr->UnRegister();
      return smartPtr;
    }
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

Parameters:
redthe red component of the materials color (range [0..1])
greenthe green component of the materials color (range [0..1])
bluethe blue component of the materials color (range [0..1])
colorCoefficienta scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]).
specularCoefficientcontrols in combination with the specular power how shiny the material will appear (range [0..1]).
specularPowercontrols in combination with the specular coefficient how shiny the material will appear (range [0..inf]).
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptionally 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.

    {
      Pointer smartPtr = new Material(red, green, blue, colorCoefficient, specularCoefficient, specularPower, opacity );
      smartPtr->UnRegister();
      return smartPtr;
    }
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

Parameters:
colorthe material color in RGB. Each RGB value should be in the range [0..1]
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptinally 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.

    {
      Pointer smartPtr = new Material(color, opacity );
      smartPtr->UnRegister();
      return smartPtr;
    }
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

Parameters:
colorthe material color in RGB. Each RGB value should be in the range [0..1]
colorCoefficienta scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]).
specularCoefficientcontrols in combination with the specular power how shiny the material will appear (range [0..1]).
specularPowercontrols in combination with the specular coefficient how shiny the material will appear (range [0..inf]).
opacitythe opacity of the material. 0.0 means fully transparent and 1.0 means solid.
nodeoptionally 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.

    {
      Pointer smartPtr = new Material(color, colorCoefficient, specularCoefficient, specularPower, opacity );
      smartPtr->UnRegister();
      return smartPtr;
    }
static Pointer mitk::Material::New ( const Material _arg ) [inline, static]

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]

Parameters:
redthe red component of the materials color (range [0..1])
greenthe green component of the materials color (range [0..1])
bluethe 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]

Parameters:
coefficientthe 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

Parameters:
interpolationthe 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.

Parameters:
opacitythe 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.

Parameters:
representationthe 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

Parameters:
specularCoefficientthe 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

Parameters:
colorthe 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

Parameters:
redthe red component of the specular color (range [0..1])
greenthe green component of the specular color (range [0..1])
bluethe 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

Parameters:
specularCoefficientthe 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.


Member Data Documentation

Definition at line 454 of file mitkMaterial.h.

vtkFloatingPointType mitk::Material::m_ColorCoefficient [protected]

Definition at line 458 of file mitkMaterial.h.

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.

Definition at line 470 of file mitkMaterial.h.

vtkFloatingPointType mitk::Material::m_SpecularCoefficient [protected]

Definition at line 460 of file mitkMaterial.h.

Definition at line 456 of file mitkMaterial.h.

vtkFloatingPointType mitk::Material::m_SpecularPower [protected]

Definition at line 462 of file mitkMaterial.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines