Hi Fred,

I would be inclined to think this is more of an issue of expectation
rather than a bug in computeIntersections/LineSegmentIntersector.  The
code is such that save for numerical precision issues it will work
exactly the same for all triangles, so if it works once then it's
likely to work all the time, and if it fails once it'll fail all the
time.  The code has been in place for quite a while so I would expect
it to be working OK otherwise we'd have heard lots of more reports of
problems.

Most likely answer is simply that the winding of the triangles you are
intersecting resulting in the normals that it's reporting.  Please not
face normals derived from the triangles themselves can be and usually
are different than vertex normals at the corners of the triangles -
they can even be pointing in different directions as vertex normals
are specified at geometry creation time and needn't bare any
connection to the faces.

Robert.

On Mon, Nov 30, 2009 at 6:24 PM, Fred Thegreat <[email protected]> wrote:
> Hi,
>
> I'm trying to do picking by using computeIntersections.
>
> Please find the attached picture (skydome).
>
> Balls represent intersection points, lines represent normal vectors.
>
> Whenever I try to pick the top of the dome (not the inside), I get a correct 
> intersection point but the normal vector is wrong. When I pick from the 
> inside the yellow lines go downwards, as expected.
>
> I have noticed other strange behaviors with more complex models. Sometimes, 
> the first intersection point/normal vector pair is not returned. Other times, 
> the intersection point and/or the normal vector is wrong.
>
> We're using OSG 2.8.1 but I tested a recent version and experienced the same 
> issue.
>
> Is this a known bug?
>
> Thanks,
> Fred
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=20605#20605
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/skydome_picking_problem_195.png
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to