Commit adb5543d authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[CLEAN] removed unused code and added some checks for empty pointers

parent 3498222c
......@@ -200,11 +200,6 @@ void WDataSetFibers::calculateLocalColors() const
wlog::debug( "WDataSetFibers" ) << "Calculating local colors: done!";
}
void WDataSetFibers::sortDescLength()
{
//std::sort( m_fibers->begin(), m_fibers->end(), wmath::hasGreaterLengthThen );
}
bool WDataSetFibers::isTexture() const
{
return false;
......
......@@ -64,11 +64,6 @@ public:
*/
size_t size() const;
/**
* Sort fibers descending on their length.
*/
void sortDescLength();
/**
* Determines whether this dataset can be used as a texture.
*
......
......@@ -120,7 +120,7 @@ void WMFiberDisplay::update()
slock = boost::shared_lock<boost::shared_mutex>( m_updateLock );
if( m_noData.changed() )
{
if( m_noData.get( true ) )
if( m_osgNode && m_noData.get( true ) )
{
m_osgNode->setNodeMask( 0x0 );
}
......@@ -178,13 +178,16 @@ void WMFiberDisplay::connectors()
void WMFiberDisplay::activate()
{
if( m_active->get() )
if( m_osgNode )
{
m_osgNode->setNodeMask( 0xFFFFFFFF );
}
else
{
m_osgNode->setNodeMask( 0x0 );
if( m_active->get() )
{
m_osgNode->setNodeMask( 0xFFFFFFFF );
}
else
{
m_osgNode->setNodeMask( 0x0 );
}
}
WModule::activate();
......@@ -226,10 +229,3 @@ void WMFiberDisplay::toggleColoring()
m_tubeDrawable->dirtyDisplayList();
}
}
WColor WMFiberDisplay::getRGBAColorFromDirection( const wmath::WPosition &pos1, const wmath::WPosition &pos2 )
{
wmath::WPosition direction( ( pos2 - pos1 ) );
direction.normalize();
return WColor( std::abs( direction[0] ), std::abs( direction[1] ), std::abs( direction[2] ) );
}
......@@ -150,15 +150,6 @@ private:
*/
osg::ref_ptr< WShader >m_shader;
/**
* calculates a color from the vector between two points in space
*
* \param pos1
* \param pos2
*/
WColor getRGBAColorFromDirection( const wmath::WPosition &pos1, const wmath::WPosition &pos2 );
/**
* switches between fiber display and tube representation
*/
......
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