Hi,
I think I am close to find the solution. I am in the very same case as Lucas
as my terrain db is generated with osgdem.
However I just found that the Drive Manipulator is capable of putting the
camera precisely on the ground! And if it can do that, then I should be able
to use the same technique (wether it uses an intersect visitor or not...).
I just figured that out and I wanted to let you know. Now I'm going to
explore the code of the Drive Manipulator and find out how it manages to do
that.
One little question for Lucas : I know you generate your terrain with
osgdem, but how do you manage to put entities on the same frame? I mean, are
you using OSG to compute new coordinates, an external toolkit, or even your
own functions ?
David
This question may be a little remedial, but how is the first solution
implemented?
In my case I load an osgdem generated terrain database with
osgDB::readNodeFile, I get a Node back: how do I get all its children
tiles below any earth center transform and run the intersectVisitor on
them?
An osgforest2 example would be great to have in a future release- put
a small section of the osgdem generated earth-centered terrain in the
osg data set, and populate with trees like the osgforest example but
also demonstrate how to traverse the osgdem generated tiles and get
precise intersections. (I'll submit something myself if I get it
working)
Thanks,
lucasw
Message: 21
Date: Wed, 7 Jun 2006 09:45:49 +0100
From: "Robert Osfield" <robert.osfield at gmail.com>
Subject: Re: [osg-users] trouble in having a PRECISE intersection
point in ..
To: "osg users" <osg-users at openscenegraph.net>
Message-ID:
<7ffb8e9b0606070145v6eb77759n2e74ced48ff241e4 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi David,
The problem is most likely that the IntersectVisitor is implemented
using floats.
The two solutions are:
1) Do the intersect in local coordinates of the terrain, i.e. below
the tiles matrix transform,
and then transform the local intersection into global coords
2) Implement a double intersect visitor.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/