#include <mitkShaderProperty.h>


Classes | |
| class | Element |
Public Types | |
| typedef ShaderProperty | Self |
| typedef EnumerationProperty | Superclass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| IdType | GetShaderId () |
| std::string | GetShaderName () |
| void | SetShader (const IdType &i) |
| void | SetShader (const std::string &i) |
Static Public Member Functions | |
| static Pointer | New () |
| static Pointer | New (const IdType &_arg) |
| static Pointer | New (const std::string &_arg) |
Protected Member Functions | |
| ShaderProperty () | |
| ShaderProperty (const IdType &value) | |
| Sets the scalar mode to the given value. If it is not valid, the scalar mode is set to default (0). | |
| ShaderProperty (const std::string &value) | |
| Sets the scalar mode to the given value. If it is not valid, the representation is set to default (0). | |
| bool | AddEnum (const std::string &name) |
| void | AddShaderTypes () |
Protected Attributes | |
| std::list< Element > | shaderList |
Encapsulates the shader enumeration
Definition at line 29 of file mitkShaderProperty.h.
| typedef itk::SmartPointer<const Self> mitk::ShaderProperty::ConstPointer |
Reimplemented from mitk::EnumerationProperty.
Definition at line 38 of file mitkShaderProperty.h.
| typedef itk::SmartPointer<Self> mitk::ShaderProperty::Pointer |
Reimplemented from mitk::EnumerationProperty.
Definition at line 38 of file mitkShaderProperty.h.
Reimplemented from mitk::EnumerationProperty.
Definition at line 38 of file mitkShaderProperty.h.
Reimplemented from mitk::EnumerationProperty.
Definition at line 38 of file mitkShaderProperty.h.
| mitk::ShaderProperty::ShaderProperty | ( | ) | [protected] |
Constructor. Sets the representation to a default value of surface(2)
Definition at line 25 of file mitkShaderProperty.cpp.
References AddShaderTypes(), and SetShader().
{
AddShaderTypes();
SetShader( (IdType)0 );
}
| mitk::ShaderProperty::ShaderProperty | ( | const IdType & | value ) | [protected] |
Sets the scalar mode to the given value. If it is not valid, the scalar mode is set to default (0).
| value | the integer representation of the scalar mode |
Definition at line 31 of file mitkShaderProperty.cpp.
{
AddShaderTypes();
SetShader(value);
}
| mitk::ShaderProperty::ShaderProperty | ( | const std::string & | value ) | [protected] |
Sets the scalar mode to the given value. If it is not valid, the representation is set to default (0).
| value | the string representation of the scalar mode |
Definition at line 37 of file mitkShaderProperty.cpp.
{
AddShaderTypes();
SetShader(value);
}
| bool mitk::ShaderProperty::AddEnum | ( | const std::string & | name ) | [protected] |
this function is overridden as protected, so that the user may not add additional invalid scalar mode types.
Definition at line 87 of file mitkShaderProperty.cpp.
References mitk::ShaderProperty::Element::name.
{
Element e;
e.name=name;
bool success=Superclass::AddEnum( e.name, (IdType)shaderList.size() );
shaderList.push_back(e);
return success;
}
| void mitk::ShaderProperty::AddShaderTypes | ( | ) | [protected] |
Adds the enumeration types as defined by vtk to the list of known enumeration values.
Definition at line 71 of file mitkShaderProperty.cpp.
References mitk::ShaderRepository::GetGlobalShaderRepository(), and mitk::ShaderRepository::GetShaders().
Referenced by ShaderProperty().
{
AddEnum( "fixed" );
std::list<mitk::ShaderRepository::Shader::Pointer> *l
= mitk::ShaderRepository::GetGlobalShaderRepository()->GetShaders();
std::list<mitk::ShaderRepository::Shader::Pointer>::const_iterator i = l->begin();
while( i != l->end() )
{
AddEnum( (*i)->name );
i++;
}
}
| virtual const char* mitk::ShaderProperty::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::EnumerationProperty.
| mitk::EnumerationProperty::IdType mitk::ShaderProperty::GetShaderId | ( | ) |
Returns the current scalar mode value as defined by VTK constants.
Definition at line 60 of file mitkShaderProperty.cpp.
{
return GetValueAsId();
}
| std::string mitk::ShaderProperty::GetShaderName | ( | ) |
Definition at line 65 of file mitkShaderProperty.cpp.
{
return GetValueAsString();
}
| static Pointer mitk::ShaderProperty::New | ( | const std::string & | _arg ) | [inline, static] |
Definition at line 44 of file mitkShaderProperty.h.
| static Pointer mitk::ShaderProperty::New | ( | ) | [static] |
Reimplemented from mitk::EnumerationProperty.
Referenced by mitk::ShaderRepository::AddDefaultProperties(), and mitkPropertySerializationTest().
Definition at line 42 of file mitkShaderProperty.h.
| void mitk::ShaderProperty::SetShader | ( | const std::string & | i ) |
Definition at line 52 of file mitkShaderProperty.cpp.
{
if ( IsValidEnumerationValue( value ) )
SetValue( value );
else
SetValue( (IdType)0 );
}
| void mitk::ShaderProperty::SetShader | ( | const IdType & | i ) |
Definition at line 44 of file mitkShaderProperty.cpp.
Referenced by ShaderProperty().
{
if ( IsValidEnumerationValue( value ) )
SetValue( value );
else
SetValue( (IdType)0 );
}
std::list<Element> mitk::ShaderProperty::shaderList [protected] |
Definition at line 57 of file mitkShaderProperty.h.
1.7.2