Commit b65d531c authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - distance map now forwards properties of marching cubes

parent 7d3f789f
......@@ -107,6 +107,12 @@ boost::signals2::signal1< void, std::string >* WProperties::addColor( std::strin
return prop->getSignalValueChanged();
}
void WProperties::addProperty( WProperty* prop )
{
m_propertyList[prop->getName()] = prop;
m_propertyVector.push_back( prop );
}
bool WProperties::existsProp( std::string name )
{
return ( findProp( name ) != 0 );
......
......@@ -183,6 +183,13 @@ public:
template< typename T> boost::signals2::signal1< void, std::string >*
addProperty( std::string name, T value, bool hidden = false, std::string shortDesc = "", std::string longDesc = "" );
/**
* Simply insert the specified property to the list.
*
* \param prop the property to add
*/
void addProperty( WProperty* prop );
/**
* getter for the value of a property as std string
*
......
......@@ -73,6 +73,8 @@ void WMDistanceMapIsosurface::moduleMain()
// now wait for it to be ready
m_marchingCubesModule->isReady().wait();
m_marchingCubesModule->getProperties()->findProp( "Iso Value" )->setValue< float >( 0.5 );
m_properties->addProperty( m_marchingCubesModule->getProperties()->findProp( "active" ) );
m_properties->addProperty( m_marchingCubesModule->getProperties()->findProp( "Iso Value" ) );
//////////////////////////////////////////////////////////////////////////////////
// Distance Map
......@@ -152,6 +154,10 @@ void WMDistanceMapIsosurface::connectors()
void WMDistanceMapIsosurface::properties()
{
// ( m_properties->addDouble( "isoValue", 80 ) )->connect( boost::bind( &WMMarchingCubes::slotPropertyChanged, this, _1 ) );
}
void WMDistanceMapIsosurface::slotPropertyChanged( std::string propertyName )
{
}
......@@ -63,6 +63,12 @@ public:
*/
virtual boost::shared_ptr< WModule > factory() const;
/**
* Determine what to do if a property was changed.
* \param propertyName Name of the property.
*/
void slotPropertyChanged( std::string propertyName );
protected:
/**
* Entry point after loading the module. Runs in separate thread.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment