<div dir="ltr"><blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hello!</div></blockquote><div><br></div><div>I will post my solution to this in case someone is interested.</div><div><br></div><div>I solved it by having two different geometries controlled by one switch node, and depending on the rendermode i control which one is visible.</div><div><br></div><div><br></div><div><div class="prettyprint" style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;"><code class="prettyprint"><div class="subprettyprint"><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #008;" class="styled-by-prettify">void</span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgSceneMesh</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">constructVertexAttribute</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">SceneMesh</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">sceneMesh</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Geode</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geode</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Geometry</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geometry</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">bool</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">constructSkeletonMesh</span></span><span style="font-family: Arial, Helvetica, sans-serif; color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    <br></span><span style="color: #660;" class="styled-by-prettify">{</span><span style="color: #000;" class="styled-by-prettify"><br></span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">    osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec3Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">vertices</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec3Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec3Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">normals</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec3Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec2Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">texCoords</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">  </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec2Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec2Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">texCoords2</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">  </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec2Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">DrawElements</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">indices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">constructSkeletonMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">indices</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">static_cast</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">DrawElements</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*>(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">DrawElementsUShort</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 106, 173);"><span style="color: #000;" class="styled-by-prettify">GL_LINE_LOOP</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">else</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">indices</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">  </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">static_cast</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">DrawElements</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*>(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">DrawElementsUShort</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">                                </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">sceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getType</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">==</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">MeshType</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">LINE</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">?</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">  </span></span><span style="color: rgb(255, 106, 173);"><span style="color: #000;" class="styled-by-prettify">GL_LINES</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">:</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 106, 173);"><span style="color: #000;" class="styled-by-prettify">GL_TRIANGLES</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec4Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">vertexColor</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vec4Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">std</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">vector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">long</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">unsigned</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">int</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">sceneMeshIndices</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">sceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getIndices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">std</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">vector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">sceneMeshVertices</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">sceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getVertices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//push</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">in</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">vertices</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #800;" class="styled-by-prettify">for</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #800;" class="styled-by-prettify">const</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #800;" class="styled-by-prettify">auto</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">&</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">:</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">sceneMeshVertices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">push_back</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Vec3</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">x_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">y_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">z_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">normals</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">push_back</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Vec3</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">nx_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">ny_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">nz_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">texCoords</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">push_back</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Vec2</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">u_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">v_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">texCoords2</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">push_back</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Vec2</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">u_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">v_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertexColor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">push_back</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Vec4</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">r_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">g_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertex</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: #800;" class="styled-by-prettify">b_</span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(229, 168, 2);"><span style="color: #800;" class="styled-by-prettify">1.f</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//push</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">in</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">indices</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #800;" class="styled-by-prettify">for</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #800;" class="styled-by-prettify">const</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #800;" class="styled-by-prettify">auto</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">&</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">index</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">:</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">sceneMeshIndices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">indices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #800;" class="styled-by-prettify">addElement</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">index</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//texture</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">buffer</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">and</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">color</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">values</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">later</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">setVertexArray</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">get</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">());</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">setNormalArray</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">normals</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">get</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(),</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #800;" class="styled-by-prettify">BIND_PER_VERTEX</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">setTexCoordArray</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #800;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">texCoords</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #800;" class="styled-by-prettify">BIND_PER_VERTEX</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">setTexCoordArray</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #800;" class="styled-by-prettify">1</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">texCoords2</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #800;" class="styled-by-prettify">BIND_PER_VERTEX</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">setColorArray</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">vertexColor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">get</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(),</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #800;" class="styled-by-prettify">Array</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #800;" class="styled-by-prettify">BIND_PER_VERTEX</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">addPrimitiveSet</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #800;" class="styled-by-prettify">indices</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #800;" class="styled-by-prettify">get</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #800;" class="styled-by-prettify">());</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">addDrawable</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geometry</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span><span style="color: #000;" class="styled-by-prettify"><br></span><span style="color: #660;" class="styled-by-prettify">}</span></span></pre></div></code></div><br><br></div><div>the render mode is controlled through this function </div><div><br></div><div><div class="prettyprint" style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;"><code class="prettyprint"><div class="subprettyprint"><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">void</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgSceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">updateRenderMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">polygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">getNumChildren</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">2</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">return</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//this</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">means</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">we</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">havent</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">initialized</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">the</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">mesh</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">yet</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//set</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">enable/disable</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">skeleton</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">mesh</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">only</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">at</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">wireframe</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">quad</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">polygonmode</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">0</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">==</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">skeleton</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">mesh,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">1</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">==</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">triangle</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">mesh</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgPolygonMode</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">switch</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">polygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">case</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">SOLID</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">:</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setValue</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">true</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setValue</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">1</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">false</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgPolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">FRONT_AND_BACK</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">FILL</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">triangleMeshVisible_</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">true</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">break</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">case</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">WIREFRAME_TRIANGLE</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">:</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setValue</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">true</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setValue</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">1</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">false</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgPolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">FRONT_AND_BACK</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">LINE</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">triangleMeshVisible_</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">true</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">break</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">case</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">GI</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">WIREFRAME_QUAD</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">:</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setValue</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">false</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setValue</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">1</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">true</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgPolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">FRONT_AND_BACK</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">PolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">FILL</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">triangleMeshVisible_</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">false</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">break</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getOrCreateStateSet</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setAttributeAndModes</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgPolygonMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">StateAttribute</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">OVERRIDE</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">|</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">StateAttribute</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">ON</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre></div></code></div><br></div><div>This works fine except for one thing, my intersection raycaster does not handle the LINE LOOP mesh when the triangle node is switched off. </div><div><br></div><div>I solved it by creating a node visitor</div><div><br></div><div><div class="prettyprint" style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;"><code class="prettyprint"><div class="subprettyprint"><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgGeodeMeshActivatorVisitor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #606;" class="styled-by-prettify">OsgGeodeMeshActivatorVisitor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">const</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">bool</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">&</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">isReset</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">:</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">isReset_</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">isReset</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">this</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setTraversalMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">NodeVisitor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">TraversalMode</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">TRAVERSE_ALL_CHILDREN</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">void</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgGeodeMeshActivatorVisitor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">apply</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">&</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">switchGeodeVisibility</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">void</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgGeodeMeshActivatorVisitor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">switchGeodeVisibility</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">&</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Group</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #008;" class="styled-by-prettify">group</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">.</span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">asGroup</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">!</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #008;" class="styled-by-prettify">group</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">return</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #008;" class="styled-by-prettify">group</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">getNumChildren</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">==</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">return</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">for</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">unsigned</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 128, 128);"><span style="color: #008;" class="styled-by-prettify">int</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">i</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">i</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #008;" class="styled-by-prettify">group</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">getNumChildren</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">++</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">i</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgSceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgSceneMesh</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">dynamic_cast</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgSceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*>(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #008;" class="styled-by-prettify">group</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getChild</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgSceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">isReset_</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">  </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgSceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">resetTriangleMeshVisible</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">else</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgSceneMesh</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">forceTriangleMeshVisible</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">switchGeodeVisibility</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(*</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #008;" class="styled-by-prettify">group</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getChild</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">i</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">));</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre></div></code></div><div><br></div><div><br></div>which can force triangle mesh visibility on and reset to original value.</div><div><br></div><div>Now in my intersection algorithm i simply force visibility on by accepting the visitor on the root node in my tree.</div><div><br></div><div><div class="prettyprint" style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;"><code class="prettyprint"><div class="subprettyprint"><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">ref_ptr</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify"><</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osgUtil</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">LineSegmentIntersector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">></span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">intersector</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">            </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">new</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osgUtil</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">LineSegmentIntersector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osgUtil</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Intersector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="font-style: italic; color: rgb(250, 86, 219);"><span style="color: #000;" class="styled-by-prettify">WINDOW</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">mousePosition</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">x</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(),</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">  </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">viewportModel_</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getHeight</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">mousePosition</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">y</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">());</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osgUtil</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">IntersectionVisitor</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">intersectionVisitor</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">intersector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #008;" class="styled-by-prettify">get</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">intersectionVisitor</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">.</span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">setTraversalMask</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">~</span></span><span style="color: rgb(229, 168, 2);"><span style="color: #066;" class="styled-by-prettify">0x1</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">//</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">mask,</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">things</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">that</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">we</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">dont</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">want</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">to</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">be</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">selected</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">sets</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #800;" class="styled-by-prettify"> </span></span><span style="font-style: italic; color: rgb(168, 171, 176);"><span style="color: #800;" class="styled-by-prettify">0x1</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Camera</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgCamera</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">viewer_</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getCamera</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgGeodeMeshActivatorVisitor</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geodeVisibilitySwitchOn</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">false</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">OsgGeodeMeshActivatorVisitor</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geodeVisibiltyReset</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">true</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(255, 183, 80);"><span style="color: #000;" class="styled-by-prettify">osg</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">::</span></span><span style="color: rgb(255, 183, 80);"><span style="color: #606;" class="styled-by-prettify">Node</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">*</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">root</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(255, 136, 40);"><span style="color: #000;" class="styled-by-prettify">viewer_</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="color: rgb(255, 234, 15);"><span style="color: #000;" class="styled-by-prettify">getSceneData</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">();</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">root</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">accept</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geodeVisibilitySwitchOn</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgCamera</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">osgCamera</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">accept</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">intersectionVisitor</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">else</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">root</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">accept</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geodeVisibiltyReset</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">return</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">rayTracedMeshPairVector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">root</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">accept</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">geodeVisibiltyReset</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">);</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: #000;" class="styled-by-prettify"><br></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">if</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">!</span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">intersector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">-></span></span><span style="font-style: italic;"><span style="color: #000;" class="styled-by-prettify">containsIntersections</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">()</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">)</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">        </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">return</span></span><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify"> </span></span><span style="color: rgb(252, 233, 79);"><span style="color: #000;" class="styled-by-prettify">rayTracedMeshPairVector</span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">;</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">}</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="font-style: italic; color: rgb(69, 198, 214);"><span style="color: #008;" class="styled-by-prettify">else</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(190, 192, 194);"><span style="color: #000;" class="styled-by-prettify">    </span></span><span style="color: rgb(214, 187, 154);"><span style="color: #660;" class="styled-by-prettify">{</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(214, 187, 154);"><span style="color: #000;" class="styled-by-prettify">      </span><span style="color: #800;" class="styled-by-prettify">//work with result, not included in this demo</span></span></pre><pre style="font-size: medium; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);"><span style="color: rgb(214, 187, 154); font-family: Arial, Helvetica, sans-serif;"><span style="color: #800;" class="styled-by-prettify">       }</span></span></pre></div></code></div><br><br></div><div><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"> And thats it, now we have the possibility to render triangulated wireframe , quaded wireframe and solid structures while intersection with the meshes are possible. here is an image of the result..</span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><span style="color: rgb(190, 192, 194);"><br></span></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><a href="https://imgur.com/a/hFh6aGm">https://imgur.com/a/hFh6aGm</a><br></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><br></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><br></pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><br></pre><pre style="color: rgb(0, 0, 0); font-size: medium;">Have a good day</pre><pre style="color: rgb(0, 0, 0); font-size: medium;"><br></pre><pre style="color: rgb(0, 0, 0); font-size: medium;">//Dan</pre></div><div><br></div><div><br></div><div> </div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/6d6b967e-b5e5-4efa-b9ef-bdd7403f4b06%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/6d6b967e-b5e5-4efa-b9ef-bdd7403f4b06%40googlegroups.com</a>.<br />