<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi, <br>
</p>
<p>The geometry state set is probably shared among several nodes.</p>
<p>You should clone the state set before setting the polygon mode:</p>
<p><tt>if (geometry->getStateSet() && </tt><tt><tt>geometry->getStateSet()->getParents().size()
> 1)<br>
{<br>
</tt></tt><tt>geometry->setStateSet(new osg::StateSet(*</tt><tt>geometry->getStateSet()));<br>
}<br>
<br>
geometry->getOrCreateStateSet()->setAttribute(new
osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK,
osg::PolygonMode::LINE));</tt><br>
</p>
<br>
<div class="moz-cite-prefix">On 24/01/2018 18:04, Werner Modenbach
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:15b3b26d-ca90-bc27-3c30-d795e991c2db@texion.eu">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Hi all,<br>
<br>
I import a 3DS model and after import it shows me a flat structure
of geodes:<br>
<br>
<span style=" color:#000000;">Final OSG node structure looks like
this:</span>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Group</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span>Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span>Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>
Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span>Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"><span style=" color:#000000;"> </span></span><span
style=" color:#000000;"><span style=" color:#000000;"><span
style=" color:#000000;"> </span></span>Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geode</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
style=" color:#000000;"> Geometry <br>
</span></p>
<br>
I do a pick with a LineSegmentIntersector.<br>
The Interesections array contains 1 hit.<br>
It is a geometry and has 1 parent - the geode.<br>
I want this geometry to show in line mode.<br>
<span style=" color:#c0c0c0;"> </span><span style="
color:#092e64;">geometry</span>-><span style="
color:#00677c;">getOrCreateStateSet</span>()-><span style="
color:#00677c;">setAttribute</span>(<span style="
color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#800080;">osg</span>::<span style="
color:#800080;">PolygonMode</span>(<span style=" color:#800080;">osg</span>::<span
style=" color:#800080;">PolygonMode</span>::<span style="
color:#800080;">FRONT_AND_BACK</span>,<span style="
color:#c0c0c0;"> </span><span style=" color:#800080;">osg</span>::<span
style=" color:#800080;">PolygonMode</span>::<span style="
color:#800080;">LINE</span>));<br>
<br>
But many geometries show up in line mode.<br>
I wrote a check NodeVisitor and this visitor finds many geometries
being set to LineMode.<br>
I wrote another visitor which explicitely disables linemode on all
geometries after loading of the model:<br>
<span style=" color:#c0c0c0;"> </span><span style="
color:#092e64;">geometry</span>-><span style="
color:#00677c;">getOrCreateStateSet</span>()-><span style="
color:#00677c;">setMode</span>(<span style=" color:#800080;">osg</span>::<span
style=" color:#800080;">StateAttribute</span>::<span style="
color:#800080;">POLYGONMODE</span>,<span style=" color:#c0c0c0;">
</span><span style=" color:#800080;">osg</span>::<span style="
color:#800080;">StateAttribute</span>::<span style="
color:#800080;">OFF</span>);<br>
I already spent many hours on that but I'm running out of ideas.<br>
<br>
Any hint from someone in the list?<br>
<br>
Many thanks in advance<br>
<br>
- Werner -<br>
<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
</body>
</html>