Hi Hartwig,

I'm currently reviewing your submission, but unfortunately since
you've made the changes to the code I've also refactored the code so
that it's not straight forward to just merge.  The code that reads the
grid and sets up the texture coordinates is now done in a
VertexNormalGenerator::populateCenter(..) method rather than the
original  GeometryTechnique::generateGeometry(..) method.

The form of the code remains quite similar, I'm sure if you look at it
you'll see that I've mostly copy and pasted the old code to a new
location, in effect I've broken down the very large generateGeometry()
into smaller code segments with a helper class do the grid reading and
coordinate setup.  With the code similarity I was hoping that I could
just drop your code in, but on review I can't spot where all the
variables you use are declared and set.  In particular your code has
the lines:

                          if (colorLocator != masterTextureLocator)

Locator::convertLocalCoordBetween(*masterTextureLocator.get(),ndc,*colorLocator,color_ndc);
                          else
                            color_ndc = ndc;
                          color_ndc[2] /= scaleHeight;

Where masterTextureLocator is only ever used in the if() statement and
exists nowhere else in the .cpp you provided.  To me it looks like the
code won't actually compile.

Robert.


On Fri, Apr 23, 2010 at 7:00 PM, Hartwig Wiesmann
<[email protected]> wrote:
> Hi,
>
> Standard contour generation does currently not work by using GeometryTerrain 
> because not the height of the terrain is used for determining the contour but 
> the x-coordinate (first coordinate of the position vector). So, when using 
> the current implementation the earth looks like a beach ball.
>
> Attached is a patch that uses the elevation for generating the texture 
> coordinates.
>
> Cheers,
> Hartwig
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=27243#27243
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/geometrytechniquecpp_209.zip
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to