<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <br>
    Hi Werner,<br>
    <br>
    I do not know if I have found the code that you are suggesting. I
    see that CullVisitor could help to find the near and far plane,
    however with Z I meant the world vertical axis, not the axis of the
    view frustum.<br>
    <br>
    Regards,<br>
    Renzo<br>
    <br>
    <div class="moz-cite-prefix">On 15-Oct-20 11:25 AM, OpenSceneGraph
      Users wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:mailman.21793.1602753923.3538.osg-users-openscenegraph.org@lists.openscenegraph.org">
      
      <p dir="ltr">Hi Renzo,<br>
        Maybe a node visitor with z-near and z-far as parameter is a
        possible approach.<br>
        Werner</p>
      <br>
      <br>
      <div class="gmail_quote">On 15. Oktober 2020 09:46:57 MESZ,
        OpenSceneGraph Users <a class="moz-txt-link-rfc2396E" href="mailto:osg-users@lists.openscenegraph.org"><osg-users@lists.openscenegraph.org></a>
        wrote:
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;"> <br>
          Hi Robert,<br>
          <br>
          <div class="moz-cite-prefix">On 14-Oct-20 3:56 PM,
            OpenSceneGraph Users wrote:<br>
          </div>
          <blockquote type="cite" cite="mid:mailman.21167.1602683796.3540.osg-users-openscenegraph.org@lists.openscenegraph.org">
            <div dir="ltr">
              <div dir="ltr">Hi Renzo,<br>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Wed, 14 Oct 2020 at
                  12:00, OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org" moz-do-not-send="true">osg-users@lists.openscenegraph.org</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div><font size="-1">I am using
                      osg::Drawable::getBoundingBox() to retrieve the
                      bounding box around the whole geometry. Is there a
                      similar short way to get the equivalent box for
                      just the culled geometry or do I need to write my
                      own procedure?</font></div>
                </blockquote>
                <div><br>
                </div>
                <div>Culling isn't related to the nodes directly, but to
                  a traversersal of the scene graph that compares the
                  bounding shere's of internal nodes of the scene graph
                  and the bounding boxes of the drawable leaves. 
                  Culling can happen at any point in the hierarchy - it
                  can cull right up at the top node in the scene graph
                  if the scene is outside the view frustum.</div>
                <div><br>
                </div>
                <div>Within the cull traversal there is no tracking of
                  culled or non culling bounding boxes, a cull test is
                  done and the bool result used directly.  There isn't a
                  "bounding box" or "bounding sphere" for culled or non
                  culled objects.  All the cull traversal cares about is
                  building a list of drawables leaves that pass the view
                  frustum test, there is no tracking of any objects that
                  are culled - this would be a crazy waste of CPU
                  resources.<br>
                </div>
                <div><br>
                </div>
                <div>I have to ask, why do you want a bounding box of
                  culled objects - what is the high level problem you
                  are trying to solve?  It may well be that you are
                  asking the wrong question thinking about the task you
                  have in the wrong way.<br>
                </div>
                <div><br>
                </div>
                <div>Robert.<br>
                </div>
              </div>
            </div>
          </blockquote>
          <br>
          thanks for pointing out how cull traversal operates.<br>
          <br>
          Yes, it might be I am searching in the wrong direction. I need
          to get the minimum and the maximum Z coordinate of the
          geometry vertices in order to apply a color range. This is
          quite easy to do for the whole geometry but I would know if
          there is a way just for the vertices inside the view frustum.<br>
          <br>
          Regards,<br>
          Renzo<br>
          <br>
          <pre class="k9mail"><hr>
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" moz-do-not-send="true">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>