<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Nick, <br>
    <blockquote
cite="mid:CAO-+zikKGebpnsMB=_enp65Z05g=y5qFEKAeaTHSgc8fQsBuyg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Robert, Community,
        <div><br>
        </div>
        <div>I am hacking the VPB process again :-). </div>
        <div><br>
        </div>
        <div>The story is this: I transform tiles back from ECEF to
          local, do something with the Geometry and I want to replace
          the tile with my own Node. Spent already hours reading and
          trying to understand the SceneGraph with all this transforms,
          and I am failing.</div>
      </div>
    </blockquote>
    <br>
    <blockquote
cite="mid:CAO-+zikKGebpnsMB=_enp65Z05g=y5qFEKAeaTHSgc8fQsBuyg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Any words of how these tiles in the QuadTree are
          represented? I mean the tree and the transforms, I know the
          facts that they are coming from TerrainTiles with proper
          Locators, but after when the GeometryTechnique is applied.</div>
      </div>
    </blockquote>
    I worked it out some years ago, where I needed to capture the
    transformations for a query-representation. Basically you will have
    a height field-layer inside the terrain-tile, which describes itself
    via a Locator and the height-values in a normalized coordinate
    frame. IIRC the complete ECEF-Transform is captured inside the
    locator. It simply assumes the height-field as being centered around
    the geographic position when creating the world-geometry. <br>
    Some snippet to retrieve the world-coordinates of the terrain-tile's
    center:<br>
    <code><br>
            osgTerrain::TerrainTile& terrain_tile =
    dynamic_cast<osgTerrain::TerrainTile&>(node);<br>
            osgTerrain::HeightFieldLayer* hf_layer=
dynamic_cast<osgTerrain::HeightFieldLayer*>(terrain_tile.getElevationLayer());<br>
            osgTerrain::Locator* locator = terrain_tile.getLocator();<br>
            osg::EllipsoidModel* es = locator->getEllipsoidModel();<br>
            <br>
            //compute center transform <br>
            osg::Vec3d center_model;<br>
            tile ->convertLocalToModel(osg::Vec3d(0.5,0.5,0.0),
    center_model);<br>
    <br>
    </code><br>
    I'm not quite sure which coordinate frame is used in the quadtree
    itself, but it should be easy enough to put some subgraph to an osgt
    to inspect.<br>
    <br>
    Cheers<br>
    Sebastian <br>
    <blockquote
cite="mid:CAO-+zikKGebpnsMB=_enp65Z05g=y5qFEKAeaTHSgc8fQsBuyg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks so much for any word on this. It is the last bump in
          my current dev</div>
        <div><br>
        </div>
        <div>Cheers,</div>
        <div>Nick<br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature" data-smartmail="gmail_signature">trajce
            nikolov nick<br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>