Commit 470f5427 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[MERGE]

parents 3bb24fca 596b5723
......@@ -180,15 +180,32 @@ void WPickHandler::pick( osgViewer::View* view, const osgGA::GUIEventAdapter& ea
assert( intersections.size() );
hitr = intersections.begin();
// Skip proxy geometry of Direct Volume Rendering
if( extractSuitableName( intersections.begin() ) == "DVR Proxy Cube" )
bool ignoreFirst = m_ctrl;
while ( hitr != intersections.end() )
{
++hitr;
std::string nodeName = extractSuitableName( hitr );
// now we skip everything that starts with an underscore
if( nodeName[0] == '_' )
{
++hitr;
}
// if ctrl is pressed we skip the first thing that gets hit by the pick
else if ( ignoreFirst )
{
++hitr;
ignoreFirst = false;
}
else
{
break;
}
}
if ( m_ctrl && ( hitr != intersections.end() ) )
if ( hitr == intersections.end() )
{
++hitr;
// after everything was ignored nothing pickable remained
return;
}
// if we have a previous pick we search for it in the list
......
......@@ -217,6 +217,7 @@ void WMArbitraryPlane::initPlane()
m_rootNode = new WGEManagedGroupNode( m_active );
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->insert( m_rootNode );
m_geode = new osg::Geode();
m_geode->setName( "_arbitraryPlane" );
m_geode->addUpdateCallback( new SafeUpdateCallback( this ) );
m_rootNode->insert( m_geode );
......
......@@ -185,7 +185,8 @@ void WMIsosurfaceRaytracer::moduleMain()
// use the OSG Shapes, create unit cube
osg::ref_ptr< osg::Node > cube = wge::generateSolidBoundingBoxNode( bb.first, bb.second, m_isoColor->get( true ) );
cube->asTransform()->getChild( 0 )->setName( "DVR Proxy Cube" ); // Be aware that this name is used in the pick handler.
cube->asTransform()->getChild( 0 )->setName( "_DVR Proxy Cube" ); // Be aware that this name is used in the pick handler.
// because of the underscore in front it won't be picked
m_shader->apply( cube );
// bind the texture to the node
......
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